filter on null parents for locations

This commit is contained in:
Hayden 2022-11-01 15:01:55 -08:00
parent 2fb5a437a2
commit b6f27dc886
No known key found for this signature in database
GPG key ID: 17CF79474E257545

View file

@ -112,6 +112,7 @@ func (r *LocationRepository) GetAll(ctx context.Context, groupId uuid.UUID) ([]L
locations locations
WHERE WHERE
locations.group_locations = ? locations.group_locations = ?
AND locations.location_children IS NULL
ORDER BY ORDER BY
locations.name ASC locations.name ASC
` `