bloody bugs

This commit is contained in:
Philip Sargent 2023-03-05 19:53:12 +00:00
parent b086348d38
commit d5887e8f99

View File

@ -271,17 +271,22 @@ def svx(request, survex_file):
outputtype = rform.cleaned_data["outputtype"] # used by CodeMirror ajax I think
difflist = form.DiffCode(rcode)
# print(">>>> ", rform.data)
svxfile = form.survexfile
if "revert" in rform.data:
pass
if "process" in rform.data:
if not difflist:
if difflist:
message = "SAVE FILE FIRST"
form.data["code"] = rcode
elif svxfile:
logmessage = form.Process()
if logmessage:
message = f"OUTPUT FROM PROCESSING\n{logmessage}"
else:
message = "SAVE FILE FIRST"
form.data["code"] = rcode
message = "SAVE VALID FILE FIRST"
form.data["code"] = rcode
if "save" in rform.data:
if request.user.is_authenticated:
message = form.SaveCode(rcode)
@ -293,7 +298,7 @@ def svx(request, survex_file):
print("Differences: ")
form.data["code"] = rcode
# process(survex_file)
# GET or after POST-specific handling
svxfile = form.survexfile # only valid once form.GetDiscCode() called
if "code" not in form.data: