Skip to content

Commit

Permalink
[PRMP-760] - add logger for changes
Browse files Browse the repository at this point in the history
  • Loading branch information
NogaNHS committed Aug 27, 2024
1 parent 064afd8 commit 6c4d31c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lambda/bulk-ods-update/bulk_ods_update.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ def compare_and_overwrite(download_type: OdsDownloadType, data: list[dict]):
PracticeOds.icb_ods_code.set(amended_record.get("IcbOdsCode")),
]
)
logger.info(f'Overwriting for ODS: {amended_record.get("PracticeOdsCode")} - Name: {amended_record.get("PracticeName")} | ICB: {amended_record.get("IcbOdsCode")}')
except Exception as e:
logger.info(
f"Failed to create/update record by Practice ODS code: {str(e)}"
Expand All @@ -186,5 +187,6 @@ def compare_and_overwrite(download_type: OdsDownloadType, data: list[dict]):
try:
icb = IcbOds(amended_record.get("IcbOdsCode"))
icb.update(actions=[IcbOds.icb_name.set(amended_record.get("IcbName"))])
logger.info(f'Overwriting for ODS: {amended_record.get("IcbOdsCode")} - Name: {amended_record.get("IcbName")}')
except Exception as e:
logger.info(f"Failed to create/update record by ICB ODS code: {str(e)}")

0 comments on commit 6c4d31c

Please sign in to comment.