Skip to content

Commit ed81db0

Browse files
committed
🐛 Handle list values returned from qc_masks
1 parent cfd7a91 commit ed81db0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

CPAC/registration/guardrails.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,8 @@ def registration_guardrail(registered: str, reference: str, retry: bool = False
8383
for metric, threshold in REGISTRATION_GUARDRAIL_THRESHOLDS.items():
8484
if threshold is not None:
8585
value = qc_metrics.get(metric)
86+
if isinstance(value, list):
87+
value = value[0]
8688
if value < threshold:
8789
with open(f'{registered}.failed_qc', 'w',
8890
encoding='utf-8') as _f:

0 commit comments

Comments
 (0)