mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2025-12-16 14:49:25 +00:00
fix green block for survex files on table
This commit is contained in:
@@ -240,7 +240,7 @@ def scanupload(request, path=None):
|
||||
git = settings.GIT
|
||||
filesaved = False
|
||||
actual_saved = []
|
||||
|
||||
|
||||
def read_json():
|
||||
'''Read JSON from the wallet metadata file in the repo
|
||||
or fills with blank data if that files can't be read'''
|
||||
@@ -472,7 +472,12 @@ def scanupload(request, path=None):
|
||||
|
||||
waldata = read_json()
|
||||
|
||||
cave =""
|
||||
jsonfile = Path(settings.DRAWINGS_DATA, "walletjson") / wallet[0:4] / wallet / "contents.json"
|
||||
print(f'! - FORM scanupload - jsonfile {jsonfile}')
|
||||
if not Path(jsonfile).is_file():
|
||||
metadataurl = ""
|
||||
else:
|
||||
metadataurl = Path("/dwgdataraw", "walletjson") / wallet[0:4] / wallet.replace("#",":") / "contents.json"
|
||||
psg = ""
|
||||
chkplannr = ""
|
||||
chkpland = ""
|
||||
@@ -565,14 +570,16 @@ def scanupload(request, path=None):
|
||||
waldata["name"] = f"several, please edit: {names}"
|
||||
print(f' - More than one block name is relevant {names} in this wallet {wallet}. Not managed in this troggle release.')
|
||||
|
||||
if waldata["cave"]:
|
||||
if "cave" in waldata:
|
||||
cave = waldata["cave"] # text string
|
||||
else:
|
||||
cave = ""
|
||||
if waldata["name"]:
|
||||
psg = waldata["name"]
|
||||
if not waldata["description url"]:
|
||||
waldata["description url"]=""
|
||||
|
||||
#Survex and survex complaints
|
||||
#Survex and survex complaints, comes from json file on disc, not as pre-populated as above
|
||||
complaints, caveobject = get_complaints([], waldata, svxfiles, files, wallet, wurl)
|
||||
# print(f' - {caveobject=}')
|
||||
|
||||
@@ -586,7 +593,7 @@ def scanupload(request, path=None):
|
||||
context = {'year': year, 'prev': prev, 'next': next, 'prevy': prevy, 'nexty': nexty,
|
||||
'files': files, 'dirs': dirs, 'waldata': waldata, 'svxfiles': svxfiles,
|
||||
'checked': checked,
|
||||
'create': create,
|
||||
'create': create, 'metadataurl': metadataurl,
|
||||
'complaints': complaints,
|
||||
'caveobject': caveobject,
|
||||
'people': waldata["people"], 'peoplesize': str(len(str(waldata["people"]))),
|
||||
|
||||
Reference in New Issue
Block a user