#228 Parcel filter
* changes parcel related filter fields from CharField to NumberField to avoid unexpected behaviour on non-numerical input
This commit is contained in:
parent
daae2609d2
commit
266f2fcdf6
@ -46,7 +46,7 @@ class GeoReferencedTableFilterMixin(django_filters.FilterSet):
|
||||
),
|
||||
)
|
||||
# Parcel
|
||||
p = django_filters.CharFilter(
|
||||
p = django_filters.NumberFilter(
|
||||
method="filter_parcel",
|
||||
label=_(""),
|
||||
label_suffix=_(""),
|
||||
@ -59,7 +59,7 @@ class GeoReferencedTableFilterMixin(django_filters.FilterSet):
|
||||
),
|
||||
)
|
||||
# Parcel counter
|
||||
pc = django_filters.CharFilter(
|
||||
pc = django_filters.NumberFilter(
|
||||
method="filter_parcel_counter",
|
||||
label=_(""),
|
||||
label_suffix=_(""),
|
||||
@ -73,7 +73,7 @@ class GeoReferencedTableFilterMixin(django_filters.FilterSet):
|
||||
)
|
||||
|
||||
# Parcel counter
|
||||
pn = django_filters.CharFilter(
|
||||
pn = django_filters.NumberFilter(
|
||||
method="filter_parcel_number",
|
||||
label=_(""),
|
||||
label_suffix=_(""),
|
||||
@ -165,7 +165,6 @@ class GeoReferencedTableFilterMixin(django_filters.FilterSet):
|
||||
Returns:
|
||||
|
||||
"""
|
||||
value = value.replace("-", "")
|
||||
queryset = self._filter_parcel_reference(
|
||||
queryset,
|
||||
Q(flr=value),
|
||||
@ -183,7 +182,6 @@ class GeoReferencedTableFilterMixin(django_filters.FilterSet):
|
||||
Returns:
|
||||
|
||||
"""
|
||||
value = value.replace("-", "")
|
||||
queryset = self._filter_parcel_reference(
|
||||
queryset,
|
||||
Q(flrstck_zhlr=value)
|
||||
@ -201,7 +199,6 @@ class GeoReferencedTableFilterMixin(django_filters.FilterSet):
|
||||
Returns:
|
||||
|
||||
"""
|
||||
value = value.replace("-", "")
|
||||
queryset = self._filter_parcel_reference(
|
||||
queryset,
|
||||
Q(flrstck_nnr=value),
|
||||
|
Loading…
Reference in New Issue
Block a user