From 6b28c4ec15b87e913f327e5785c70789a33c2ebe Mon Sep 17 00:00:00 2001 From: mpeltriaux Date: Sat, 26 Oct 2024 10:24:10 +0200 Subject: [PATCH] # Drop atomic transaction * drops atomic transaction processing on Parcel.make_unique --- konova/models/parcel.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/konova/models/parcel.py b/konova/models/parcel.py index 7fafba52..371d2d14 100644 --- a/konova/models/parcel.py +++ b/konova/models/parcel.py @@ -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