diff --git a/core/views/caves.py b/core/views/caves.py index 8727c03..fa51263 100644 --- a/core/views/caves.py +++ b/core/views/caves.py @@ -111,15 +111,14 @@ def getnotablecaves(): notablecaves = [] for kataster_number in settings.NOTABLECAVESHREFS: try: - cave = Cave.objects.get(kataster_number=kataster_number) + cave = Cave.objects.get(kataster_number=kataster_number, areacode="1623") notablecaves.append(cave) except: - # print(" ! FAILED to get only one cave per kataster_number OR invalid number for: "+kataster_number) - caves = Cave.objects.all().filter(kataster_number=kataster_number) - for c in caves: - # print(c.kataster_number, c.slug()) - if c.slug() is not None: - notablecaves.append(c) + print(" ! FAILED to get only one cave per kataster_number OR invalid number for: "+kataster_number) + + hc = Cave.objects.get(kataster_number=359, areacode="1626") + notablecaves.append(hc) + print(notablecaves) return notablecaves