better error handling

This commit is contained in:
Philip Sargent
2022-07-23 20:05:58 +03:00
parent a1e538e93a
commit 5007393536
2 changed files with 12 additions and 7 deletions

View File

@@ -211,9 +211,14 @@ def scanupload(request, path=None):
wallet = "2022#01" # improve this later
year = wallet[:4]
if int(year) <= 1998:
#print(f'! - FORM scanupload - start {wallet} REDIRECT TO OLDWALLET')
try:
if int(year) <= 1998:
#print(f'! - FORM scanupload - start {wallet} REDIRECT TO OLDWALLET')
return(oldwallet(request, path))
except:
# if nonumeric wallet name for example
return(oldwallet(request, path))
if str(wallet).lower().endswith('indexpages'):
# print(f'! - FORM scanupload - start {wallet} REDIRECT TO OLDWALLET')