Commit cecd45a9 authored by Pierre Dittgen's avatar Pierre Dittgen
Browse files

Use new is_body_error and is_structure_error from validata_core.helpers

parent 42705d9e
......@@ -20,6 +20,8 @@ from validata_core.helpers import (
FileContentValidataResource,
URLValidataResource,
ValidataResource,
is_body_error,
is_structure_error,
)
from . import app, config, fetch_schema, pdf_service, schema_catalog_registry
......@@ -253,9 +255,9 @@ def create_validata_ui_report(validata_core_report, schema_dict):
# Then group them in 2 groups : structure and body
ui_report["table"]["errors"] = {"structure": [], "body": []}
for err in errors:
if "#head" in err["tags"] or "#structure" in err["tags"]:
if is_structure_error(err):
ui_report["table"]["errors"]["structure"].append(err)
elif "#body" in err["tags"] or "#content" in err["tags"]:
elif is_body_error(err):
ui_report["table"]["errors"]["body"].append(err)
# Group body errors by row id
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment