SEED-platform / seed

Standard Energy Efficiency Data (SEED) Platform™ is a web-based application that helps organizations easily manage data on the energy performance of large groups of buildings.
Other
106 stars 55 forks source link

`Create a Data Logger` dialog can present incorrect errors #4592

Open axelstudios opened 3 months ago

axelstudios commented 3 months ago

Describe the bug Create a Data Logger dialog has multiple required inputs, but returns incorrect errors if those fields don't have values.

For instance, if you attempt to submit only a name, the returned error is that the name isn't unique even if it actually is (the real error in this case is null value in column "location_description" violates not-null constraint).

If you then submit a value for the Location Description, the next suppressed error is null value in column "identifier" violates not-null constraint.

Expected Behavior When submitting form inputs, errors should be reported accurately, and the form should not allow submission without values in the three required fields:

Actual Behavior image

Steps to Reproduce

  1. Go to the Sensors page for a property
  2. Attempt to create a data logger given only a unique name