mirror of
https://github.com/ansible/awx.git
synced 2026-03-11 14:39:30 -02:30
Check for anonymous user in the activity stream middleware and don't
attempt to attach user information to the event
This commit is contained in:
@@ -39,7 +39,7 @@ class ActivityStreamMiddleware(threading.local):
|
||||
post_save.disconnect(dispatch_uid=self.disp_uid)
|
||||
|
||||
for instance in ActivityStream.objects.filter(id__in=self.instance_ids):
|
||||
if drf_user and drf_user.pk:
|
||||
if drf_user and drf_user != AnonymousUser and drf_user.pk:
|
||||
instance.actor = drf_user
|
||||
try:
|
||||
instance.save(update_fields=['actor'])
|
||||
|
||||
Reference in New Issue
Block a user