diff --git a/src/organizations/repositories.py b/src/organizations/repositories.py index 72928c5..a9d03ec 100644 --- a/src/organizations/repositories.py +++ b/src/organizations/repositories.py @@ -47,7 +47,7 @@ class OrganizationRepository(BaseRepository): @classmethod def get_for_map(cls, categories, coords1, coords2): rectangle = Polygon.from_bbox((*coords1, *coords2)) - return cls.get_by_categories(categories).filter(location__within=rectangle) + return cls.get_by_categories(categories).filter(location__coords__within=rectangle) class OrganizationImagesRepository(BaseRepository):