mirror of
https://github.com/ansible/awx.git
synced 2026-03-20 18:37:39 -02:30
Merge pull request #4337 from ryanpetrello/activity-stream-missing-jt
fix a 500 error for Activity Stream job records w/ a missing JT Reviewed-by: https://github.com/softwarefactory-project-zuul[bot]
This commit is contained in:
@@ -4687,10 +4687,10 @@ class ActivityStreamSerializer(BaseSerializer):
|
|||||||
if fk not in summary_keys:
|
if fk not in summary_keys:
|
||||||
return
|
return
|
||||||
related_obj = getattr(obj, summary_keys[fk], None)
|
related_obj = getattr(obj, summary_keys[fk], None)
|
||||||
summary_fields[get_type_for_model(related_obj)] = []
|
|
||||||
item = {}
|
item = {}
|
||||||
fields = SUMMARIZABLE_FK_FIELDS[summary_keys[fk]]
|
fields = SUMMARIZABLE_FK_FIELDS[summary_keys[fk]]
|
||||||
if related_obj is not None:
|
if related_obj is not None:
|
||||||
|
summary_fields[get_type_for_model(related_obj)] = []
|
||||||
for field in fields:
|
for field in fields:
|
||||||
fval = getattr(related_obj, field, None)
|
fval = getattr(related_obj, field, None)
|
||||||
if fval is not None:
|
if fval is not None:
|
||||||
|
|||||||
Reference in New Issue
Block a user