From ee2254281c7f3ad38b8935742cfd38fddaa10863 Mon Sep 17 00:00:00 2001 From: Eli Ribble Date: Thu, 16 Apr 2026 20:39:30 +0000 Subject: [PATCH] Fix erasing feature locations --- platform/feature.go | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/platform/feature.go b/platform/feature.go index 2a235617..6e6f10e6 100644 --- a/platform/feature.go +++ b/platform/feature.go @@ -28,8 +28,8 @@ func featuresBySiteID(ctx context.Context, site_ids []int32) (map[int32][]types. sm.Columns( "feature.id AS id", "feature.site_id AS site_id", - "COALESCE(ST_X(feature.location), 0) AS \"location.longitude\"", - "COALESCE(ST_Y(feature.location), 0) AS \"location.latitude\"", + "COALESCE(feature.location_longitude, 0) AS \"location.longitude\"", + "COALESCE(feature.location_latitude, 0) AS \"location.latitude\"", "'pool' AS type", ), sm.From("feature"), @@ -53,10 +53,7 @@ func featuresBySiteID(ctx context.Context, site_ids []int32) (map[int32][]types. if !ok { return nil, fmt.Errorf("impossible") } - features = append(features, types.Feature{ - ID: row.ID, - Type: "pool", - }) + features = append(features, row) results[row.SiteID] = features } return results, nil