Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#4832] Fix json schema matcher in Objects API #4938

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/openforms/contrib/objects_api/json_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ def json_schema_matches(
if "string" in target_types and (target_format := target_schema.get("format")):
variable_format = variable_schema.get("format")
if variable_format is None:
return False
return True
return variable_format == target_format

return True
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ def test_json_schema_matches(self):
variable_schema = {"type": "string"}
target_schema = {"type": "string", "format": "email"}

self.assertFalse(
self.assertTrue(
json_schema_matches(
variable_schema=variable_schema, target_schema=target_schema
)
Expand Down
Loading