ImperialCollegeLondon / Faraday-liionsden

BSD 3-Clause "New" or "Revised" License
2 stars 1 forks source link

Mandatory fields need refining #118

Closed dandavies99 closed 1 year ago

dandavies99 commented 2 years ago

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:

Aha! Link: https://imperial-college-ict.aha.io/requirements/RSE-132-22

AdrianDAlessandro commented 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 "?"):

dandavies99 commented 1 year ago

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.

dandavies99 commented 1 year ago

For the models with mandatory name, we can inherit from HasMandatoryName instead of HasName.