Skip to content

Commit

Permalink
Merge pull request #1530 from the-deep/fix/remove-geo-tag-from-entry
Browse files Browse the repository at this point in the history
Filter project wise geo widgets  in entry tags
  • Loading branch information
subinasr authored Oct 2, 2024
2 parents 7e441e0 + 0fab674 commit 0e189e2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion apps/entry/dataloaders.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
Attribute,
EntryGroupLabel,
)
from geo.models import GeoArea


class EntryLoader(DataLoaderWithContext):
Expand Down Expand Up @@ -52,7 +53,9 @@ def batch_load_fn(self, keys):

class AttributeGeoSelectedOptionsLoader(DataLoaderWithContext):
def batch_load_fn(self, keys):
geo_area_qs = get_geo_area_queryset_for_project_geo_area_type().filter(
geo_area_qs = get_geo_area_queryset_for_project_geo_area_type(
queryset=GeoArea.get_for_project(self.context.active_project)
).filter(
id__in={id for ids in keys for id in ids}
).defer('polygons')
geo_area_map = {
Expand Down

0 comments on commit 0e189e2

Please sign in to comment.