Skip to content

Commit

Permalink
safeguard against failed records for KPI check
Browse files Browse the repository at this point in the history
  • Loading branch information
tomkralidis committed May 1, 2024
1 parent cdacf61 commit a1a2aac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion wis2-gdc-management/wis2_gdc/registrar.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ def register(self, metadata: dict) -> None:
kpi_results['report-by'] = CENTRE_ID
kpi_results['centre-id'] = self.centre_id

if PUBLISH_REPORTS:
if PUBLISH_REPORTS and 'summary' in kpi_results:
LOGGER.info('Publishing KPI report to broker')
self.broker.pub(topic, json.dumps(kpi_results))

Expand Down

0 comments on commit a1a2aac

Please sign in to comment.