Mercurial > gemma
diff pkg/controllers/surveys.go @ 3645:02951a62e8c6
'Historicise' bottlenecks on import
author | Tom Gottfried <tom@intevation.de> |
---|---|
date | Wed, 12 Jun 2019 17:11:15 +0200 |
parents | ec6163c6687d |
children | 2a079d0a71c1 |
line wrap: on
line diff
--- a/pkg/controllers/surveys.go Wed Jun 12 17:10:49 2019 +0200 +++ b/pkg/controllers/surveys.go Wed Jun 12 17:11:15 2019 +0200 @@ -36,7 +36,8 @@ ON b.gauge_location = g.location AND b.gauge_validity = g.validity JOIN waterway.sounding_results AS s ON b.id = s.bottleneck_id LEFT JOIN waterway.gauges_reference_water_levels AS r - USING (depth_reference, location, validity) + ON s.depth_reference = r.depth_reference + AND g.location = r.location AND g.validity = r.validity WHERE b.objnam = $1` )