store denormalized metadata about ActivityStream.actor for accounting

see: https://github.com/ansible/tower/issues/1782
This commit is contained in:
Ryan Petrello
2018-05-21 16:16:18 -04:00
parent ffdd7f162b
commit f434196bae
5 changed files with 72 additions and 2 deletions

View File

@@ -4831,6 +4831,9 @@ class ActivityStreamSerializer(BaseSerializer):
username = obj.actor.username,
first_name = obj.actor.first_name,
last_name = obj.actor.last_name)
elif obj.deleted_actor:
summary_fields['actor'] = obj.deleted_actor.copy()
summary_fields['actor']['id'] = None
if obj.setting:
summary_fields['setting'] = [obj.setting]
return summary_fields