From 6efbec7750511ad70bd4ae5cfd2271aab03edeb7 Mon Sep 17 00:00:00 2001 From: Philip Sargent <philip.sargent@klebos.com> Date: Sun, 17 Jul 2022 15:41:05 +0300 Subject: [PATCH] Date and People checks --- core/views/uploads.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/core/views/uploads.py b/core/views/uploads.py index 3e589a8..358c6db 100644 --- a/core/views/uploads.py +++ b/core/views/uploads.py @@ -85,7 +85,6 @@ xlate = {"url": "description url", "people": "people", "date": "date", "cave": "cave", - "people": "people", "plannr": "plan not required", "survexnr": "survex not required", "qmsw": "qms written", @@ -102,6 +101,14 @@ def get_complaints(complaints, waldata, svxfiles, files): '''Taken from old script wallets.py and edited to make more comprehensible Loads the survex files names and processes all complaints ''' + # Date + if not waldata["date"]: + complaints.append("A date is mandatory. No data can be updated or edited unless you specify a date. Look in the survex file if there is one.") + + # People + if waldata["people"]==["NOBODY"] or waldata["people"]==["Unknown"]: + complaints.append("Someody must have done this. Look in the survex file, or in the logbook entries for this date, for the people who created this data.") + survex_complaint = "" if waldata["survex file"]: @@ -156,7 +163,6 @@ def get_complaints(complaints, waldata, svxfiles, files): if not waldata["qms written"]: complaints.append("The QMs needs writing into the survex file. Tick the 'QMs written' checkbox when this is done.") - # Website if not waldata["website updated"]: complaints.append("The cave description website is marked as needing updating using the guidebook description from the survex file. Tick the 'Website updated' checkbox when this is done.")