2
0
mirror of https://expo.survex.com/repositories/troggle/.git synced 2025-12-17 12:27:09 +00:00

Import new survexfile ONLY

This commit is contained in:
2023-03-06 16:37:54 +00:00
parent 94e145adce
commit 432759bfc1
2 changed files with 118 additions and 70 deletions

View File

@@ -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":