Skip to content

Commit 3b9b34b

Browse files
committed
Fixed org metadata validation
1 parent fec3ba9 commit 3b9b34b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

snet/cli/commands/commands.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -585,7 +585,7 @@ def _metadata_validate(self, as_exception=True):
585585
self._printout(validation_res["msg"])
586586
exit(1)
587587
with open(self.args.metadata_file, 'r') as f:
588-
org_metadata = OrganizationMetadata.from_json(json.load(f))
588+
org_metadata = OrganizationMetadata.from_json(json.load(f), False)
589589

590590
occurred_errors = []
591591
unique_group_names = set([group.group_name for group in org_metadata.groups])
@@ -656,6 +656,8 @@ def get_path(err):
656656
res_msg += f"{get_path(e)} - {e.message}"
657657
if e.validator == 'minItems':
658658
res_msg += f" (minimum 1 item required)"
659+
elif e.validator == 'maxLength':
660+
res_msg += f"{get_path(e)} - string is too long"
659661
else:
660662
res_msg += e.message
661663
res_msg += "\n"

0 commit comments

Comments
 (0)