# 61 Filter backend

* refactors table filters by introducing AbstractTableFilter, GeoReferencedTableFilterMixin, ShareableTableFilterMixin and RecordableTableFilterMixin
* adds full filter functionality
* refactors TableFilter inheritances for all objects
This commit is contained in:
2022-01-11 12:56:27 +01:00
parent ddb13abe2e
commit a4966751b7
6 changed files with 379 additions and 141 deletions

View File

@@ -110,9 +110,13 @@ class Geometry(BaseResource):
underlying_parcels = []
for result in fetched_parcels:
fetched_parcel = result[typename]
# There could be parcels which include the word 'Flur',
# which needs to be deleted and just keep the numerical values
## THIS CAN BE REMOVED IN THE FUTURE, WHEN 'Flur' WON'T OCCUR ANYMORE!
flr_val = fetched_parcel["ave:flur"].replace("Flur ", "")
parcel_obj = Parcel.objects.get_or_create(
gmrkng=fetched_parcel["ave:gemarkung"],
flr=fetched_parcel["ave:flur"],
flr=flr_val,
flrstck_nnr=fetched_parcel['ave:flstnrnen'],
flrstck_zhlr=fetched_parcel['ave:flstnrzae'],
)[0]