mirror of
https://github.com/ansible/awx.git
synced 2026-04-14 06:29:25 -02:30
fix a 500 error for Activity Stream job records w/ a missing JT
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