From 36995ec05169974139fbfd6b768e6e935d97ab46 Mon Sep 17 00:00:00 2001 From: Philip Sargent Date: Tue, 20 Sep 2022 02:36:40 +0300 Subject: handling survex files not linked in completely --- parsers/scans.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'parsers/scans.py') diff --git a/parsers/scans.py b/parsers/scans.py index f9ec449..60b3d17 100644 --- a/parsers/scans.py +++ b/parsers/scans.py @@ -21,10 +21,10 @@ from troggle.core.views.scans import datewallet ''' contentsjson = "contents.json" -#indexhtml = "walletindex.html" + git = settings.GIT -# to do: create a 'low priority' field, so that any such wallet does not appear in summary reports +# to do: Actually read all the JSON files and set the survex file field appropriately! def CheckEmptyDate(wallet): @@ -107,7 +107,7 @@ def load_all_scans(): for walletname, fpath, fisdir in GetListDir(fpath): if fisdir: wallet = Wallet(fpath=fpath, walletname=walletname) - # this is where we should load the contents.json for people so we can report on them later + # this is where we should load the contents.json for people, cave and date so we can report on them later # this is where we should record the year explicitly # line 347 of view/uploads.py and needs refactoring for loading contentsjson CheckEmptyDate(wallet) @@ -128,6 +128,7 @@ def load_all_scans(): if Path(walletpath, contentsjson).is_file(): walletname = walletpath.name wallet, created = Wallet.objects.update_or_create(walletname=walletname) + # should now also load the json and use it ! check &ref is correct or missing too if created: print(f"\n{walletname} created: only JSON, no actual uploaded scan files.", end=' ') CheckEmptyDate(wallet) -- cgit v1.2.3