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
Describe the bugCreate 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:
Display Name
Datalogger ID
Location Description
Actual Behavior
Steps to Reproduce
Go to the Sensors page for a property
Attempt to create a data logger given only a unique name
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](https://github.com/SEED-platform/seed/assets/411466/42836db9-6d7f-46e3-af05-74f6703a3451)
Steps to Reproduce