#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:
1 parent
e3fbe60fce
commit
591e35a0e2
8 files changed
+132
-11
No files matched your search
@@ -133,7 +133,9 @@ class CompensationTable(BaseTable, TableRenderMixin):
|
||||
Returns:
|
||||
|
||||
"""
|
||||
parcels = value.parcels.values_list(
|
||||
parcels = value.parcels.filter(
|
||||
parcelintersection__calculated_on__isnull=False,
|
||||
).values_list(
|
||||
"gmrkng",
|
||||
flat=True
|
||||
).distinct()
|
||||
@@ -294,7 +296,9 @@ class EcoAccountTable(BaseTable, TableRenderMixin):
|
||||
Returns:
|
||||
|
||||
"""
|
||||
parcels = value.parcels.values_list(
|
||||
parcels = value.parcels.filter(
|
||||
parcelintersection__calculated_on__isnull=False,
|
||||
).values_list(
|
||||
"gmrkng",
|
||||
flat=True
|
||||
).distinct()
|
||||
|
||||
Reference in new issue
Block a user