diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2025-07-31 13:01:41 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2025-07-31 13:01:41 +0200 |
commit | 48bfd85f66e4047bee767f1df6d41bdb6aae2ef3 (patch) | |
tree | cf783dc14e364f5c391f612289c0d56fd992acc9 /archaeological_context_records | |
parent | 9cebc9753a9c7c8bda14b48ab6ff292d9b06afae (diff) | |
download | Ishtar-48bfd85f66e4047bee767f1df6d41bdb6aae2ef3.tar.bz2 Ishtar-48bfd85f66e4047bee767f1df6d41bdb6aae2ef3.zip |
🐛 import: force explicitly geo check on post treatments for complex associations
Diffstat (limited to 'archaeological_context_records')
-rw-r--r-- | archaeological_context_records/models.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/archaeological_context_records/models.py b/archaeological_context_records/models.py index 9be9789d9..d9bc520f2 100644 --- a/archaeological_context_records/models.py +++ b/archaeological_context_records/models.py @@ -478,7 +478,10 @@ class GeographicSubTownItem(GeoItem): if main_geodata_id not in self.geodata.values_list("id", flat=True): upper = getattr(self, upper_attr, None) modified = True - self.geodata.add(upper.main_geodata) + try: + self.geodata.add(upper.main_geodata) + except IntegrityError: + pass if not main_item_is_set: if self.main_geodata_id != main_geodata_id: |