1
0
mirror of https://github.com/ansible/awx.git synced 2024-11-02 09:51:09 +03:00

fix naming problem with ActivityStream logging

This commit is contained in:
AlanCoding 2016-05-23 16:48:21 -04:00
parent 0f742fb7a7
commit 9ed77508a7

View File

@ -409,7 +409,7 @@ def activity_stream_associate(sender, instance, **kwargs):
# If the m2m is from the User side we need to # If the m2m is from the User side we need to
# set the content_object of the Role for our entry. # set the content_object of the Role for our entry.
if type(instance) == User and role.content_object is not None: 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.role.add(role)
activity_entry.object_relationship_type = obj_rel activity_entry.object_relationship_type = obj_rel