Riverscapes / QRiS

Riverscapes Studio - for QGIS
https://qris.riverscapes.net
GNU General Public License v3.0
2 stars 0 forks source link

Metrics Failing to update due to Unique name constraint #491

Closed KellyMWhitehead closed 2 months ago

KellyMWhitehead commented 2 months ago

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.

KellyMWhitehead commented 2 months ago

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.

Version 0.9.4