mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2025-12-16 14:57:12 +00:00
handling survex files not linked in completely
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user