Skip to content

Commit

Permalink
Address undefined variable error in mapper lambda_function.py
Browse files Browse the repository at this point in the history
  • Loading branch information
lthurston committed Oct 3, 2023
1 parent d0416eb commit b2c5d05
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion metadata_mapper/lambda_function.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,13 +101,13 @@ def map_page(collection_id: int, page_filename: str, collection: Union[dict, str
mapped_records = [record.solr_updater() for record in mapped_records]
mapped_records = [record.remove_none_values() for record in mapped_records]

group_page_exceptions = {}
page_exceptions = {
rec.legacy_couch_db_id: rec.enrichment_report
for rec in mapped_records if rec.enrichment_report
}
if page_exceptions:
# Group like lists of enrichment chain errors
group_page_exceptions = {}
for couch_id, reports in page_exceptions.items():
report = " | ".join(reports)
group_page_exceptions.setdefault(report, []).append(couch_id)
Expand Down

0 comments on commit b2c5d05

Please sign in to comment.