Skip to content

Commit

Permalink
🎨 [#4344] Emit correct validation error code
Browse files Browse the repository at this point in the history
  • Loading branch information
sergei-maertens committed Nov 15, 2024
1 parent 98f2a7a commit 860c997
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/openforms/registrations/contrib/zgw_apis/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ def _validate_against_objects_api_group(attrs: RegistrationOptions) -> None:
"Objects API group must be specified if an objecttype is specified."
)
},
code="invalid",
code="required",
)

# `objecttypes_service` is required on `ObjectsAPIGroup`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,7 @@ def test_validation_objects_api_group_not_null_if_objecttype_is_defined(self):
self.assertFalse(result)
self.assertIn("objects_api_group", serializer.errors)
err = serializer.errors["objects_api_group"][0]
self.assertEqual(err.code, "invalid")
self.assertEqual(err.code, "required")

def test_validation_objecttype_api_root_must_match_objecttypes_service_api_root(
self,
Expand Down

0 comments on commit 860c997

Please sign in to comment.