Skip to content

Commit

Permalink
Bugfix: Summary report generation (#3430)
Browse files Browse the repository at this point in the history
* fix summary report gen post dissem model refactor

* fix summary report gen post dissem model refactor
  • Loading branch information
timoballard authored Feb 20, 2024
1 parent c36e5a6 commit 088b45e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion backend/dissemination/summary_reports.py
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,10 @@ def _get_attribute_or_data(obj, field_name):
)
return getattr(fa, field_name)
else:
return getattr(obj, field_name)
value = getattr(obj, field_name)
if isinstance(value, General):
value = value.report_id
return value


def gather_report_data_dissemination(report_ids):
Expand Down Expand Up @@ -439,6 +442,8 @@ def gather_report_data_pre_certification(i2d_data):
value = getattr(obj, field_name)
if isinstance(value, datetime):
value = value.replace(tzinfo=None)
if isinstance(value, General):
value = value.report_id
row.append(value)
data[model_name]["entries"].append(row)

Expand Down

0 comments on commit 088b45e

Please sign in to comment.