From ca87fa714f7780e2bd76a00aaf865e0b03b73b0a Mon Sep 17 00:00:00 2001 From: Matthew Jones Date: Tue, 10 Dec 2013 10:55:12 -0500 Subject: [PATCH] Fix issue AC-761, issue with the activity stream middleware could throw exception during authentication --- awx/main/middleware.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/awx/main/middleware.py b/awx/main/middleware.py index 15ee181a8a..9b644ee7c2 100644 --- a/awx/main/middleware.py +++ b/awx/main/middleware.py @@ -15,6 +15,7 @@ class ActivityStreamMiddleware(object): def __init__(self): self.disp_uid = None + self.instances = [] def process_request(self, request): if hasattr(request, 'user') and hasattr(request.user, 'is_authenticated') and request.user.is_authenticated(): @@ -22,7 +23,6 @@ class ActivityStreamMiddleware(object): else: user = None - self.instances = [] set_actor = curry(self.set_actor, user) self.disp_uid = str(uuid.uuid1()) post_save.connect(set_actor, sender=ActivityStream, dispatch_uid=self.disp_uid, weak=False)