Skip to content

Commit

Permalink
[#5034] Validate ownership only when the object needs update
Browse files Browse the repository at this point in the history
  • Loading branch information
vaszig committed Jan 30, 2025
1 parent b783091 commit 8e71ffc
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/openforms/registrations/contrib/objects_api/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ def set_defaults(options: RegistrationOptions) -> None:
def verify_initial_data_ownership(
self, submission: Submission, options: RegistrationOptions
) -> None:
# Object's ownership validation makes sense if we want to update an object
if not options["update_existing_object"]:
return

assert submission.initial_data_reference
api_group = options["objects_api_group"]
assert api_group, "Can't do anything useful without an API group"
Expand Down

0 comments on commit 8e71ffc

Please sign in to comment.