From dac3e6e2889b1d194069c1b8d1eb98fea6d1f7eb Mon Sep 17 00:00:00 2001 From: Philip Sargent Date: Sat, 28 Dec 2024 23:49:26 +0000 Subject: Entrances now do cookie / git author thing. + tidyup. --- core/views/survex.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'core/views/survex.py') diff --git a/core/views/survex.py b/core/views/survex.py index afa6a69..5707720 100644 --- a/core/views/survex.py +++ b/core/views/survex.py @@ -324,8 +324,9 @@ def svx(request, survex_file): if request.method == "POST": # If the form has been submitted... rform = SvxForm(request.POST) # - if rform.is_valid(): # All validation rules pass (how do we check it against the filename and users?) + if rform.is_valid(): # All Django syntax validation rules pass (how do we check it against a valid filename and users?) editor = rform.cleaned_data["who_are_you"] + editor = git_string(editor) rcode = rform.cleaned_data["code"] outputtype = rform.cleaned_data["outputtype"] # used by CodeMirror ajax I think difflist = form.DiffCode(rcode) @@ -352,9 +353,8 @@ def svx(request, survex_file): if "save" in rform.data: if request.user.is_authenticated: if difflist: - editor = rform.cleaned_data["who_are_you"] print(f"Saving code and editor id {editor=}") - message = form.SaveCode(rcode, editor) + message = form.SaveCode(rcode, editor) # saves file and does git thing else: message = "NO DIFFERENCES - so not saving the file" else: -- cgit v1.2.3