summaryrefslogtreecommitdiffstats
path: root/core/views/survex.py
diff options
context:
space:
mode:
Diffstat (limited to 'core/views/survex.py')
-rw-r--r--core/views/survex.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/core/views/survex.py b/core/views/survex.py
index ea00fcc..e91d228 100644
--- a/core/views/survex.py
+++ b/core/views/survex.py
@@ -213,6 +213,7 @@ class SvxForm(forms.Form):
comment = f"Online survex edit: {self.data['filename']}.svx on dev machine '{socket.gethostname()}' "
only_commit(fname, comment)
+ # should only call this is something changed
parse_one_file(self.data["filename"])
return "SAVED and committed to git (if there were differences)"
@@ -311,7 +312,10 @@ def svx(request, survex_file):
form.data["code"] = rcode
if "save" in rform.data:
if request.user.is_authenticated:
- message = form.SaveCode(rcode)
+ if difflist:
+ message = form.SaveCode(rcode)
+ else:
+ message = "NO DIFFERENCES - so not saving the file"
else:
message = "You do not have authority to save this file. Please log in."
if message != "SAVED":