#86 Parcel-Geometry improvement

* improves the way parcel-geometry relations are stored on the DB
    * instead of a numerical sequence we switched to UUID, so no sequence will run out at anytime (new model: ParcelIntersection)
    * instead of dropping all M2M relations between parcel and geometry on each calculation, we keep the ones that still exist, drop the ones that do not exist and add new ones (if new ones exist)
This commit is contained in:
2022-02-09 09:18:35 +01:00
parent e3fbe60fce
commit 591e35a0e2
8 changed files with 132 additions and 11 deletions

View File

@@ -103,7 +103,9 @@ class EmaTable(BaseTable, TableRenderMixin):
Returns:
"""
parcels = value.parcels.values_list(
parcels = value.parcels.filter(
parcelintersection__calculated_on__isnull=False,
).values_list(
"gmrkng",
flat=True
).distinct()