Добавлена выдача по точкам на карте

main
through-your-tears 9 months ago
parent 5dbeff70ac
commit 4739fff068

@ -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):

Loading…
Cancel
Save