From 29a7b984daa7a17471ecdaf3dfc59ded42b491d4 Mon Sep 17 00:00:00 2001 From: Philip Sargent Date: Mon, 14 Oct 2024 20:59:01 +0300 Subject: [PATCH] Error ms inserted --- core/views/caves.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) 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 = []