Skip to content

Commit

Permalink
importer: Set output_pid in raw_json in handler
Browse files Browse the repository at this point in the history
  • Loading branch information
sakshamarora1 committed Mar 4, 2024
1 parent fc3e6dc commit c041c36
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions cds_ils/importer/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,8 @@ def importer_exception_handler(
exc, log_id, record_recid, json_data=None, *args, **kwargs
):
"""Handle importer exception."""
report = {"raw_json": json_data}
if hasattr(exc, "record_id"):
report["output_pid"] = exc.record_id
output_pid = getattr(exc, "record_id", None)
report = {"raw_json": json_data, "output_pid": output_pid}
ImportRecordLog.create_failure(
log_id, record_recid, str(exc.description), report=report
)
Expand Down

0 comments on commit c041c36

Please sign in to comment.