2
0
mirror of https://expo.survex.com/repositories/troggle/.git synced 2024-11-21 23:01:52 +00:00

notable caves fix

This commit is contained in:
Philip Sargent 2023-09-13 18:45:59 +03:00
parent af136d3432
commit 33a485d207

View File

@ -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