summaryrefslogtreecommitdiff
path: root/archaeological_context_records/models.py
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2022-03-31 17:38:31 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2022-12-12 12:21:00 +0100
commit810cf25c85cd44fe1610db4792693983a81c8818 (patch)
tree8c890597afae74c44266ccbec14882a772a201d4 /archaeological_context_records/models.py
parent5dfc4cfee03d1bb8cc85f7148d9e3ce3344a4e30 (diff)
downloadIshtar-810cf25c85cd44fe1610db4792693983a81c8818.tar.bz2
Ishtar-810cf25c85cd44fe1610db4792693983a81c8818.zip
Geodata: gpkg, shp import
Diffstat (limited to 'archaeological_context_records/models.py')
-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():