1
0
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:
Matthew Jones 2015-11-17 16:41:45 -05:00
parent b74f7d6cc5
commit 7ffbb2dac6

View File

@ -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)