From adf9f40c2ec88ec46a12c5c0a9d740269891e4ca Mon Sep 17 00:00:00 2001 From: Matthew Jones Date: Mon, 18 Nov 2013 11:02:23 -0500 Subject: [PATCH] Make sure we check the instance list in the activity stream middleware so we aren't causing a storm of update events trying to attach the request user --- awx/main/middleware.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/awx/main/middleware.py b/awx/main/middleware.py index 87959af432..c5982d9ed1 100644 --- a/awx/main/middleware.py +++ b/awx/main/middleware.py @@ -44,7 +44,8 @@ class ActivityStreamMiddleware(object): if isinstance(user, User) and instance.user is None: instance.user = user else: - self.isActivityStreamEvent = True - self.instances.append(instance) + if instance not in self.instances: + self.isActivityStreamEvent = True + self.instances.append(instance) else: self.isActivityStreamEvent = False