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

Empty use restriction form is validated #270

Closed
vildead opened this issue Jul 30, 2021 · 0 comments · Fixed by #283
Closed

Empty use restriction form is validated #270

vildead opened this issue Jul 30, 2021 · 0 comments · Fixed by #283
Assignees
Labels
bug Something isn't working waiting-for-merge Issue has been implemented, waiting to be merged
Milestone

Comments

@vildead
Copy link
Member

vildead commented Jul 30, 2021

Describe the bug (current behaviour)
Empty use restriction in data declaration edit form is validated - it must be first deleted in order to Submit successfully.

To reproduce

  1. Go to Data declaration edit page
  2. fill in all required fields but leave the last (extra) restriction form empty
  3. submit

this should successfully pass since the restriction form is empty - but it is failing with "This field is required" on Use category field (required restriction_class field).

Expected behaviour
Since it is an 'extra' form, the validation should be skipped if the data did not change (at least according to the doc). But it seems the form.has_changed attribute is True in the view.

Environment:
bd88a9e

@pinarpink pinarpink added blocker The issue is of most importance bug Something isn't working and removed blocker The issue is of most importance labels Aug 2, 2021
@vildead vildead added this to the 2021-09 milestone Sep 7, 2021
@jLebioda jLebioda added the waiting-for-merge Issue has been implemented, waiting to be merged label Sep 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working waiting-for-merge Issue has been implemented, waiting to be merged
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants