master #447

Merged
mpeltriaux merged 3 commits from master into Docker 2024-10-26 10:25:07 +02:00
Showing only changes of commit eb528de48b - Show all commits

View File

@ -159,7 +159,6 @@ class Parcel(UuidModel):
return f"{self.parcel_group} | {self.flr} | {self.flrstck_zhlr} | {self.flrstck_nnr}"
@classmethod
@transaction.atomic
def make_unique(cls, **kwargs):
""" Checks for duplicates of a Parcel, choose a (now) unique one,
repairs relations for ParcelIntersection and removes duplicates.
@ -188,6 +187,7 @@ class Parcel(UuidModel):
intersection_objs = ParcelIntersection.objects.filter(
parcel__in=parcel_objs
)
# Change each intersection, so they point on the 'true one' parcel from now on
for intersection in intersection_objs:
intersection.parcel = unique_parcel