mirror of
https://github.com/ansible/awx.git
synced 2026-01-11 01:57:35 -03: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:
parent
00676c95e0
commit
a6a1a6504a
@ -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'])
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user