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:04:19 +0200 |
commit | 8723715ffd39b8dbabafd24dac8a3149d7744c8b (patch) | |
tree | 23b03e9b858101cab6461c5996881ee4c7d70b46 /archaeological_context_records/models.py | |
parent | 13d9e094f56c9d2646d6aa4c09383df567eee5cb (diff) | |
download | Ishtar-8723715ffd39b8dbabafd24dac8a3149d7744c8b.tar.bz2 Ishtar-8723715ffd39b8dbabafd24dac8a3149d7744c8b.zip |
🐛 import: force explicitly geo check on post treatments for complex associations
Diffstat (limited to 'archaeological_context_records/models.py')
-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 861558c09..210fd7996 100644 --- a/archaeological_context_records/models.py +++ b/archaeological_context_records/models.py @@ -479,7 +479,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: |