From 61208f6a7704d3820f4f0977460cbebc0d351fd6 Mon Sep 17 00:00:00 2001 From: Wayne Witzel III Date: Thu, 26 May 2016 15:24:25 -0400 Subject: [PATCH] content_object can be None, that is what we care about --- awx/main/signals.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/awx/main/signals.py b/awx/main/signals.py index c5a99840ce..86dff57df2 100644 --- a/awx/main/signals.py +++ b/awx/main/signals.py @@ -384,7 +384,7 @@ def activity_stream_associate(sender, instance, **kwargs): obj2 = kwargs['model'] obj2_id = entity_acted obj2_actual = obj2.objects.get(id=obj2_id) - if isinstance(obj2_actual, Role) and hasattr(obj2_actual, 'content_object'): + if isinstance(obj2_actual, Role) and obj2_actual.content_object is not None: obj2_actual = obj2_actual.content_object object2 = camelcase_to_underscore(obj2_actual.__class__.__name__) else: