Closed dandavies99 closed 1 year ago
Starting by reviewing what is visible in the forms. Some issues with saving forms with blank values in mandatory fields might be solved by the valid formset issue identified in https://github.com/ImperialCollegeLondon/Faraday-liionsden/pull/209#issuecomment-1320097556
Models and fields that should be mandatory (uncertain marked with "?"):
This is great - looks like a really thorough sweep. Some of these might benefit an IRL discussion so let's do that then make some changes.
For the models with mandatory name, we can inherit from HasMandatoryName
instead of HasName
.
Problem: Many models can be saved without some info that seems as though it should be mandatory. E.g. "name". There may be a good reason that some models don't fundamentally have to have certain fields as mandatory, but it might be a good idea to review this.
Proposed solution:
null=True
, review whether this should be enforced in the front end in some cases. E.g. should a user be able to upload an Experiment with no "name" via the webapp form? This can be enforced at the form level if needed.Aha! Link: https://imperial-college-ict.aha.io/requirements/RSE-132-22