From db1647883025952d348d0c9ee9aadd8cd9623393 Mon Sep 17 00:00:00 2001 From: Wayne Witzel III Date: Fri, 10 Jun 2016 17:24:18 -0400 Subject: [PATCH] only special case team when sender is Role_parents --- awx/main/signals.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/awx/main/signals.py b/awx/main/signals.py index 7f3f900db8..e9de3617f2 100644 --- a/awx/main/signals.py +++ b/awx/main/signals.py @@ -158,14 +158,13 @@ def org_admin_edit_members(instance, action, model, reverse, pk_set, **kwargs): def rbac_activity_stream(instance, sender, **kwargs): user_type = ContentType.objects.get_for_model(User) - team_type = ContentType.objects.get_for_model(Team) # Only if we are associating/disassociating if kwargs['action'] in ['pre_add', 'pre_remove']: # Only if this isn't for the User.admin_role if hasattr(instance, 'content_type'): if instance.content_type in [None, user_type]: return - elif instance.content_type == team_type: + elif sender.__name__ == 'Role_parents': role = kwargs['model'].objects.filter(pk__in=kwargs['pk_set']).first() else: role = instance