justquick/django-activity-stream — Issue #44: Multiple site support
Author: mfitzp
Created: 2011-11-04 18:47:47+00:00
State: open

When using activity-stream on across multiple sites hosted on the same database (using django.sites) key errors show up after a an action is added for a follow on a different site.

To reproduce:
1. Create a multi-site django installation
2. On site1 'follow' an object
3. Trigger adding an action to the db by updating the followed object
4. Visit site2 calling user_stream( request.user) and key error occurs, referring to the user object:

KeyError at /
(3L, 1L)
/home/martin/methodmint/submod/external/actstream/gfk.py in fetch_generic_relations, line 69

Interestingly, if you then follow the same model (not the same object) on site2 the error disappears.

Also, django-activity-stream doesn't respect on_site managers when generating the above lists (this may be a separate issue - although implementing that would probably fix this one too?)