Skip to content

Commit 582687f

Browse files
MaxNumeriquegithub-actions[bot]
authored andcommitted
Apply prepare changes
1 parent 366fa6f commit 582687f

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/opengeodeweb_back/utils_functions.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,14 +85,16 @@ def validate_request(request, schema):
8585
validate(json_data)
8686
except fastjsonschema.JsonSchemaException as e:
8787
error_msg = str(e)
88-
88+
8989
if "data must contain" in error_msg:
9090
field = error_msg.split("data must contain ['")[1].split("']")[0]
9191
error_msg = f"'{field}' is a required property"
9292
elif "data must not contain" in error_msg:
9393
field = error_msg.split("data must not contain {'")[1].split("'")[0]
94-
error_msg = f"Additional properties are not allowed ('{field}' was unexpected)"
95-
94+
error_msg = (
95+
f"Additional properties are not allowed ('{field}' was unexpected)"
96+
)
97+
9698
flask.abort(400, f"Validation error: {error_msg}")
9799

98100

0 commit comments

Comments
 (0)