mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2025-01-31 15:32:35 +00:00
bugfix if no svx file
This commit is contained in:
parent
8b889ade5f
commit
3b997a32bf
@ -172,12 +172,13 @@ def scanupload(request, path=None):
|
||||
wd["people"][i] = elem.strip()
|
||||
|
||||
#print(f'--- ${wd["survex file"]}$ - {type(wd["survex file"])}')
|
||||
if wd["survex file"][0] == '[':
|
||||
wd["survex file"] = wd["survex file"][1:-1]
|
||||
wd["survex file"] = wd["survex file"].replace("\"", "").split(",")
|
||||
for i, elem in enumerate(wd["survex file"]):
|
||||
wd["survex file"][i] = elem.strip()
|
||||
#print(f'--- {wd["survex file"]} - {type(wd["survex file"])}')
|
||||
if wd["survex file"]: # allow for no survex file at all
|
||||
if wd["survex file"][0] == '[':
|
||||
wd["survex file"] = wd["survex file"][1:-1]
|
||||
wd["survex file"] = wd["survex file"].replace("\"", "").split(",")
|
||||
for i, elem in enumerate(wd["survex file"]):
|
||||
wd["survex file"][i] = elem.strip()
|
||||
#print(f'--- {wd["survex file"]} - {type(wd["survex file"])}')
|
||||
|
||||
with open(contents_path, "w") as jfile:
|
||||
json.dump(wd, jfile, indent = 1)
|
||||
|
Loading…
Reference in New Issue
Block a user