From 33a485d207d1ea6b8bf8cc3c67231dccc8778af2 Mon Sep 17 00:00:00 2001 From: Philip Sargent Date: Wed, 13 Sep 2023 18:45:59 +0300 Subject: [PATCH] notable caves fix --- core/views/caves.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) 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