mirror of
https://github.com/ansible/awx.git
synced 2024-11-01 16:51:11 +03:00
Don't save the instance in set_actor if the user is invalid
This commit is contained in:
parent
b74f7d6cc5
commit
7ffbb2dac6
@ -66,9 +66,7 @@ class ActivityStreamMiddleware(threading.local):
|
||||
if user.exists():
|
||||
user = user[0]
|
||||
instance.actor = user
|
||||
else:
|
||||
instance.actor = AnonymousUser
|
||||
instance.save(update_fields=['actor'])
|
||||
instance.save(update_fields=['actor'])
|
||||
else:
|
||||
if instance.id not in self.instance_ids:
|
||||
self.instance_ids.append(instance.id)
|
||||
|
Loading…
Reference in New Issue
Block a user