Fix validation in subject / legal representative create form

Bengfort requested to merge fix-subject-create-validation into main

Steps to reproduce:

  • Go to subject / legal representative search
  • Search for a subject
  • Switch to the create tab
  • Do not select a privacy level
  • Submit
  • Expected result: A validation error tells you to select a privacy level
  • Actual result: Castellum acts as if you had submitted the search form instead of the create form.

Both views contain two forms: One for search and one for create. On the server-side, the existence of a privacy-level field is used as a distinguishing feature between the two. So when no privacy level is selected, the server treats the request as a search instead of a create.

Once one of the radio buttons in checked there is no way in the UI to uncheck it. By default, the "0 (regular)" option should be selected. This broke in b1fe7e30 due to a int/float comparison (it's been a long while since I had issue with those in python).

Merge request reports