From b6f27dc8862a7a074c31ec56bfc3dbb130182cfa Mon Sep 17 00:00:00 2001 From: Hayden <64056131+hay-kot@users.noreply.github.com> Date: Tue, 1 Nov 2022 15:01:55 -0800 Subject: [PATCH] filter on null parents for locations --- backend/internal/data/repo/repo_locations.go | 1 + 1 file changed, 1 insertion(+) diff --git a/backend/internal/data/repo/repo_locations.go b/backend/internal/data/repo/repo_locations.go index 394a757..f7d63eb 100644 --- a/backend/internal/data/repo/repo_locations.go +++ b/backend/internal/data/repo/repo_locations.go @@ -112,6 +112,7 @@ func (r *LocationRepository) GetAll(ctx context.Context, groupId uuid.UUID) ([]L locations WHERE locations.group_locations = ? + AND locations.location_children IS NULL ORDER BY locations.name ASC `