We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 6fd04fb + c44d1f3 commit c300776Copy full SHA for c300776
dandischema/consts.py
@@ -12,15 +12,16 @@
12
"0.6.6",
13
"0.6.7",
14
"0.6.8",
15
+ DANDI_SCHEMA_VERSION,
16
]
17
18
# ATM we allow only for a single target version which is current
19
# migrate has a guard now for this since it cannot migrate to anything but current
20
# version
21
ALLOWED_TARGET_SCHEMAS = [DANDI_SCHEMA_VERSION]
22
+
23
# This allows multiple schemas for validation, whereas target schemas focus on
24
# migration.
-ALLOWED_VALIDATION_SCHEMAS = ALLOWED_TARGET_SCHEMAS + ALLOWED_INPUT_SCHEMAS
-
25
-if DANDI_SCHEMA_VERSION not in ALLOWED_INPUT_SCHEMAS:
26
- ALLOWED_INPUT_SCHEMAS.append(DANDI_SCHEMA_VERSION)
+ALLOWED_VALIDATION_SCHEMAS = sorted(
+ set(ALLOWED_INPUT_SCHEMAS).union(ALLOWED_TARGET_SCHEMAS)
27
+)
0 commit comments