From 562ef48f190d0f5d8f39782aefe8d3abb71932d7 Mon Sep 17 00:00:00 2001 From: Philip Sargent Date: Thu, 23 Mar 2023 01:17:38 +0000 Subject: re-parsing survex file when editing --- core/views/survex.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'core/views/survex.py') diff --git a/core/views/survex.py b/core/views/survex.py index c80c76d..57a8d1a 100644 --- a/core/views/survex.py +++ b/core/views/survex.py @@ -223,10 +223,12 @@ class SvxForm(forms.Form): comment = f"Online survex edit: {self.data['filename']}.svx on dev machine '{socket.gethostname()}' " only_commit(fname, comment) + msg = "SAVED and committed to git (if there were differences)" # should only call this is something changed - parse_one_file(self.data["filename"]) - - return "SAVED and committed to git (if there were differences)" + if parse_one_file(self.data["filename"]): + return msg + else: + return msg + "\nBUT PARSING failed. Do a completely new databaseReset." def Process(self): print(">>>>....\n....Processing\n") -- cgit v1.2.3