summaryrefslogtreecommitdiff
path: root/archaeological_context_records/models.py
diff options
context:
space:
mode:
Diffstat (limited to 'archaeological_context_records/models.py')
-rw-r--r--archaeological_context_records/models.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/archaeological_context_records/models.py b/archaeological_context_records/models.py
index 55b101acc..09733b566 100644
--- a/archaeological_context_records/models.py
+++ b/archaeological_context_records/models.py
@@ -25,7 +25,7 @@ from django.conf import settings
from django.contrib.gis.db import models
from django.contrib.postgres.indexes import GinIndex
from django.contrib.sites.models import Site
-from django.db import connection, IntegrityError, transaction
+from django.db import connection, transaction, OperationalError, IntegrityError
from django.db.models import Q
from django.db.models.signals import post_delete, post_save, m2m_changed
from django.urls import reverse
@@ -461,7 +461,7 @@ class GeographicSubTownItem(GeoItem):
# multiple save, post treatments can cause synchronous add
with transaction.atomic():
self.geodata.add(town.main_geodata)
- except IntegrityError:
+ except (OperationalError, IntegrityError):
pass
if save:
post_save_geo(self.__class__, instance=self, created=False,