From 9d56e467cd266c7fa89f2e179ca7e137c9e85bc1 Mon Sep 17 00:00:00 2001 From: Philip Sargent Date: Fri, 23 Sep 2022 21:07:51 +0300 Subject: fix broken upload form --- core/views/uploads.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'core/views/uploads.py') 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 -- cgit v1.2.3