Merge pull request #2015 from AlanCoding/1997_AS_naming_bug

Fix ActivityStream naming mismatch bug
This commit is contained in:
Alan Rominger 2016-05-26 15:21:41 -04:00
commit b0526cdd6a

View File

@ -409,7 +409,7 @@ def activity_stream_associate(sender, instance, **kwargs):
# If the m2m is from the User side we need to
# set the content_object of the Role for our entry.
if type(instance) == User and role.content_object is not None:
getattr(activity_entry, role.content_type.name).add(role.content_object)
getattr(activity_entry, role.content_type.name.replace(' ', '_')).add(role.content_object)
activity_entry.role.add(role)
activity_entry.object_relationship_type = obj_rel