mirror of
https://github.com/ansible/awx.git
synced 2026-01-16 12:20:45 -03:30
Fix issue AC-1047, don't use pk when verifying that the user exists and isn't anonymous
This commit is contained in:
parent
507d2e158d
commit
99f2f65be2
@ -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 != AnonymousUser and drf_user.pk:
|
||||
if drf_user and drf_user.id:
|
||||
instance.actor = drf_user
|
||||
try:
|
||||
instance.save(update_fields=['actor'])
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user