diff options
Diffstat (limited to 'archaeological_warehouse/models.py')
-rw-r--r-- | archaeological_warehouse/models.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/archaeological_warehouse/models.py b/archaeological_warehouse/models.py index d30a90f56..096ff0b6c 100644 --- a/archaeological_warehouse/models.py +++ b/archaeological_warehouse/models.py @@ -853,7 +853,8 @@ class Container(DocumentItem, Merge, LightHistorizedItem, QRCodeItem, GeoItem, @classmethod def _change_child_location(cls, parent): - for child in cls.objects.filter(parent=parent).all(): + for child in cls.objects.filter( + parent=parent).exclude(location=parent.location).all(): if child.location != parent.location: child.location = parent.location child.save() |