Skip to content

Commit c1eb034

Browse files
committed
add condition when orig_norm is none
1 parent 77a9ac0 commit c1eb034

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

reproschema/tests/test_rs2redcap_redcap2rs.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -243,8 +243,12 @@ def compare_protocols(prot_tree_orig, prot_tree_final):
243243
elif orig_norm is False:
244244
if final_norm is not False:
245245
error = True
246-
# Case 3: original is something else - must match exactly
247-
elif orig_norm is not None:
246+
# Case 3: original is None - final can be None or True
247+
elif orig_norm is None:
248+
if not (final_norm is None or final_norm is True):
249+
error = True
250+
# Case 4: original is something else - must match exactly
251+
else:
248252
if orig_norm != final_norm:
249253
error = True
250254
else: # handle valueRequired

0 commit comments

Comments
 (0)