summaryrefslogtreecommitdiff
path: root/archaeological_context_records
diff options
context:
space:
mode:
Diffstat (limited to 'archaeological_context_records')
-rw-r--r--archaeological_context_records/models.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/archaeological_context_records/models.py b/archaeological_context_records/models.py
index e9bd70aa8..3a89a6ca9 100644
--- a/archaeological_context_records/models.py
+++ b/archaeological_context_records/models.py
@@ -421,8 +421,10 @@ class GeographicSubTownItem(GeoItem):
)
if has_geo_town:
bad_towns = q_geodata_current_town
- else:
+ elif town:
bad_towns = q_geodata_current_town.exclude(source_id=town.id)
+ else:
+ return
modified = False
for bad_town in bad_towns.all():