diff options
author | Philip Sargent <philip.sargent@klebos.com> | 2022-09-20 02:36:40 +0300 |
---|---|---|
committer | Philip Sargent <philip.sargent@klebos.com> | 2022-09-20 02:36:40 +0300 |
commit | 36995ec05169974139fbfd6b768e6e935d97ab46 (patch) | |
tree | fc3c3865ffb4d493c68abbbf67b56473c1a39b2e /parsers/scans.py | |
parent | 61f9863a068a0e2d128a100088cf42c0c61c97ab (diff) | |
download | troggle-36995ec05169974139fbfd6b768e6e935d97ab46.tar.gz troggle-36995ec05169974139fbfd6b768e6e935d97ab46.tar.bz2 troggle-36995ec05169974139fbfd6b768e6e935d97ab46.zip |
handling survex files not linked in completely
Diffstat (limited to 'parsers/scans.py')
-rw-r--r-- | parsers/scans.py | 7 |
1 files changed, 4 insertions, 3 deletions
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) |