summaryrefslogtreecommitdiffstats
path: root/core/views/uploads.py
diff options
context:
space:
mode:
authorPhilip Sargent <philip.sargent@klebos.com>2022-09-23 21:07:51 +0300
committerPhilip Sargent <philip.sargent@klebos.com>2022-09-23 21:07:51 +0300
commit9d56e467cd266c7fa89f2e179ca7e137c9e85bc1 (patch)
tree015d8801c27a6e92816c51018308dd402d725337 /core/views/uploads.py
parent97b0ce8c96f4d7b42d9f90beec7f824ae49c3089 (diff)
downloadtroggle-9d56e467cd266c7fa89f2e179ca7e137c9e85bc1.tar.gz
troggle-9d56e467cd266c7fa89f2e179ca7e137c9e85bc1.tar.bz2
troggle-9d56e467cd266c7fa89f2e179ca7e137c9e85bc1.zip
fix broken upload form
Diffstat (limited to 'core/views/uploads.py')
-rw-r--r--core/views/uploads.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/core/views/uploads.py b/core/views/uploads.py
index 17b57cb..676c554 100644
--- a/core/views/uploads.py
+++ b/core/views/uploads.py
@@ -8,6 +8,7 @@ import datetime
from pathlib import Path
from functools import reduce
+from urllib.parse import unquote
from django import forms
@@ -207,7 +208,7 @@ def get_complaints(complaints, waldata, svxfiles, files, wallet, wurl):
if not waldata["description written"]:
complaints.append("The guidebook description needs writing into the survex file. Tick the 'Cave description written' checkbox when this is done.")
# QMs
- if not waldata["qms written"]:
+ if not waldata["qms written"] and int(w.year()) >= 2015:
complaints.append("The QMs needs writing into the survex file. Tick the 'QMs written' checkbox when this is done.")
# Website
@@ -359,8 +360,9 @@ def scanupload(request, path=None):
year = wallet[:4]
try:
- if wallet[4]!= "#":
- #print(f'! - FORM scanupload - start {wallet} REDIRECT TO OLDWALLET')
+ if wallet[4] != "#" and wallet[4] != ":":
+ # print(f'! - FORM scanupload - {wallet[4]} unurlencoded {unquote(wallet)[4]}')
+ # print(f'! - FORM scanupload - start {wallet} REDIRECT TO OLDWALLET')
return(oldwallet(request, path))
except:
# if nonumeric wallet name for example