Skip to content

Commit

Permalink
🐛 fix filters linting
Browse files Browse the repository at this point in the history
  • Loading branch information
LePetitTim committed Jan 24, 2023
1 parent fe36266 commit ef7526d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions geotrek/maintenance/filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
from mapentity.filters import PolygonFilter, PythonPolygonFilter

from geotrek.altimetry.filters import AltimetryPointFilterSet
from geotrek.core.models import Topology
from geotrek.authent.filters import StructureRelatedFilterSet
from geotrek.common.filters import OptionalRangeFilter, RightFilter
from geotrek.zoning.filters import (IntersectionFilterCity, IntersectionFilterDistrict,
Expand Down Expand Up @@ -45,7 +44,7 @@ def filter(self, qs, values):
elements_in_bbox = []
for value in values:
elements_in_bbox.extend(model.objects.filter(**{'geom__%s' % self.lookup_expr: self.get_geom(value)}).values_list('id',
flat=True))
flat=True))
if 'geotrek.outdoor' in settings.INSTALLED_APPS and issubclass(model, Site) or issubclass(model, Course):
interventions.extend(qs.values_list('id', flat=True).filter(target_type=target_type).exclude(
target_id__in=model.objects.values_list('id', flat=True)
Expand Down Expand Up @@ -176,7 +175,7 @@ class ProjectFilterSet(StructureRelatedFilterSet):
city = ProjectIntersectionFilterCity(label=_('City'), lookup_expr='intersects', required=False)
district = ProjectIntersectionFilterDistrict(label=_('District'), lookup_expr='intersects', required=False)
area_type = ProjectIntersectionFilterRestrictedAreaType(label=_('Restricted area type'), lookup_expr='intersects', required=False)
area = ProjectIntersectionFilterRestrictedArea(label=_('Restricted area'),lookup_expr='intersects', required=False)
area = ProjectIntersectionFilterRestrictedArea(label=_('Restricted area'), lookup_expr='intersects', required=False)

class Meta(StructureRelatedFilterSet.Meta):
model = Project
Expand Down

0 comments on commit ef7526d

Please sign in to comment.