Metric table in database has a Unique Constraint on the Name field. Subsequently a machine_code field as created to manage uniqueness (along with version #), however the name constraint is causing two metrics to fail getting added since they have a new unique machine code but similar name.
Changed the validation so that the metric name updates a metric if it finds one with the same name instead of insert. Metrics should have unique names anyway.
Metric table in database has a Unique Constraint on the Name field. Subsequently a machine_code field as created to manage uniqueness (along with version #), however the name constraint is causing two metrics to fail getting added since they have a new unique machine code but similar name.