Mercurial > gemma
changeset 4442:49aa67fb2b6d
Improve error message if predictions reference no valid gauge
... and in passing remove the reference to a constraint that has
been removed quite some time ago.
author | Tom Gottfried <tom@intevation.de> |
---|---|
date | Thu, 19 Sep 2019 20:45:05 +0200 |
parents | 940b53bdf871 |
children | acfd3a3b012a |
files | pkg/pgxutils/errors.go |
diffstat | 1 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/pkg/pgxutils/errors.go Thu Sep 19 18:20:19 2019 +0200 +++ b/pkg/pgxutils/errors.go Thu Sep 19 20:45:05 2019 +0200 @@ -84,8 +84,9 @@ switch err.TableName { case "gauge_measurements", "gauge_predictions", "bottlenecks": switch err.ConstraintName { - case "gauge_key", "waterway_bottlenecks_reference_gauge", - "waterway_gauge_measurements_reference_gauge": + case "waterway_bottlenecks_reference_gauge", + "waterway_gauge_measurements_reference_gauge", + "waterway_gauge_predictions_reference_gauge": m = "Referenced gauge with matching temporal validity not available" return }