summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/models.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/core/models.py b/core/models.py
index 73063b2..87f8ea9 100644
--- a/core/models.py
+++ b/core/models.py
@@ -451,10 +451,12 @@ class Cave(TroggleModel):
return res
def getCaveByReference(reference):
- print reference
areaname, code = reference.split("-", 1)
+ print areaname, code
area = Area.objects.get(short_name = areaname)
+ print area
foundCaves = list(Cave.objects.filter(area = area, kataster_number = code).all()) + list(Cave.objects.filter(area = area, unofficial_number = code).all())
+ print list(foundCaves)
assert len(foundCaves) == 1
return foundCaves[0]