# Drop atomic transaction
* drops atomic transaction processing on Parcel.make_unique
This commit is contained in:
parent
46a2a4ff46
commit
6b28c4ec15
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user