Skip to content

Commit e46f001

Browse files
committed
Fix cases when no errors or warnings received
Previously if not validation errors returned errors value was None that was not iterable.
1 parent e079d54 commit e46f001

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

arho_feature_template/gui/docks/validation_dock.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -63,15 +63,16 @@ def list_validation_errors(self, validation_json):
6363
for error_data in validation_json.values():
6464
if not isinstance(error_data, dict):
6565
continue
66-
errors = error_data.get("errors", [])
66+
67+
errors = error_data.get("errors") or []
6768
for error in errors:
6869
self.validation_result_tree_view.add_error(
6970
error.get("ruleId", ""),
7071
error.get("instance", ""),
7172
error.get("message", ""),
7273
)
7374

74-
warnings = error_data.get("warnings", [])
75+
warnings = error_data.get("warnings") or []
7576
for warning in warnings:
7677
self.validation_result_tree_view.add_warning(
7778
warning.get("ruleId", ""),

0 commit comments

Comments
 (0)