diff --git a/core/views/caves.py b/core/views/caves.py index 75b50a9..4af4217 100644 --- a/core/views/caves.py +++ b/core/views/caves.py @@ -169,12 +169,14 @@ def caveKey(c): if not c.kataster_number: return "9999." + c.unofficial_number else: - if int(c.kataster_number) >= 100: - return "99." + c.kataster_number - if int(c.kataster_number) >= 10: - return "9." + c.kataster_number - return c.kataster_number - + try: + if int(c.kataster_number) >= 100: + return "99." + c.kataster_number + if int(c.kataster_number) >= 10: + return "9." + c.kataster_number + return c.kataster_number + except: + return c.kataster_number + "_ERROR" def getnotablecaves(): notablecaves = []