#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
eb2d01eeea
commit
deb97fbbf3
@ -46,7 +46,7 @@ class GeoReferencedTableFilterMixin(django_filters.FilterSet):
|
|||||||
),
|
),
|
||||||
)
|
)
|
||||||
# Parcel
|
# Parcel
|
||||||
p = django_filters.CharFilter(
|
p = django_filters.NumberFilter(
|
||||||
method="filter_parcel",
|
method="filter_parcel",
|
||||||
label=_(""),
|
label=_(""),
|
||||||
label_suffix=_(""),
|
label_suffix=_(""),
|
||||||
@ -59,7 +59,7 @@ class GeoReferencedTableFilterMixin(django_filters.FilterSet):
|
|||||||
),
|
),
|
||||||
)
|
)
|
||||||
# Parcel counter
|
# Parcel counter
|
||||||
pc = django_filters.CharFilter(
|
pc = django_filters.NumberFilter(
|
||||||
method="filter_parcel_counter",
|
method="filter_parcel_counter",
|
||||||
label=_(""),
|
label=_(""),
|
||||||
label_suffix=_(""),
|
label_suffix=_(""),
|
||||||
@ -73,7 +73,7 @@ class GeoReferencedTableFilterMixin(django_filters.FilterSet):
|
|||||||
)
|
)
|
||||||
|
|
||||||
# Parcel counter
|
# Parcel counter
|
||||||
pn = django_filters.CharFilter(
|
pn = django_filters.NumberFilter(
|
||||||
method="filter_parcel_number",
|
method="filter_parcel_number",
|
||||||
label=_(""),
|
label=_(""),
|
||||||
label_suffix=_(""),
|
label_suffix=_(""),
|
||||||
@ -165,7 +165,6 @@ class GeoReferencedTableFilterMixin(django_filters.FilterSet):
|
|||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
"""
|
"""
|
||||||
value = value.replace("-", "")
|
|
||||||
queryset = self._filter_parcel_reference(
|
queryset = self._filter_parcel_reference(
|
||||||
queryset,
|
queryset,
|
||||||
Q(flr=value),
|
Q(flr=value),
|
||||||
@ -183,7 +182,6 @@ class GeoReferencedTableFilterMixin(django_filters.FilterSet):
|
|||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
"""
|
"""
|
||||||
value = value.replace("-", "")
|
|
||||||
queryset = self._filter_parcel_reference(
|
queryset = self._filter_parcel_reference(
|
||||||
queryset,
|
queryset,
|
||||||
Q(flrstck_zhlr=value)
|
Q(flrstck_zhlr=value)
|
||||||
@ -201,7 +199,6 @@ class GeoReferencedTableFilterMixin(django_filters.FilterSet):
|
|||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
"""
|
"""
|
||||||
value = value.replace("-", "")
|
|
||||||
queryset = self._filter_parcel_reference(
|
queryset = self._filter_parcel_reference(
|
||||||
queryset,
|
queryset,
|
||||||
Q(flrstck_nnr=value),
|
Q(flrstck_nnr=value),
|
||||||
|
Loading…
Reference in New Issue
Block a user