Mercurial > gemma
diff pkg/controllers/surveys.go @ 3656:2a079d0a71c1
Ensure sounding results are associated to matching bottleneck version
author | Tom Gottfried <tom@intevation.de> |
---|---|
date | Thu, 13 Jun 2019 19:13:42 +0200 |
parents | 02951a62e8c6 |
children | 02d5c2e17eb8 |
line wrap: on
line diff
--- a/pkg/controllers/surveys.go Thu Jun 13 11:20:17 2019 +0200 +++ b/pkg/controllers/surveys.go Thu Jun 13 19:13:42 2019 +0200 @@ -34,7 +34,7 @@ FROM waterway.bottlenecks AS b JOIN waterway.gauges AS g ON b.gauge_location = g.location AND b.gauge_validity = g.validity - JOIN waterway.sounding_results AS s ON b.id = s.bottleneck_id + JOIN waterway.sounding_results AS s ON b.bottleneck_id = s.bottleneck_id LEFT JOIN waterway.gauges_reference_water_levels AS r ON s.depth_reference = r.depth_reference AND g.location = r.location AND g.validity = r.validity