From 41c68aef26437e865f356ab13f4715c5da490764 Mon Sep 17 00:00:00 2001 From: Philip Sargent Date: Tue, 16 Aug 2022 20:02:28 +0300 Subject: detecting empty wallets where we only have JSON and no files --- core/views/survex.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'core/views/survex.py') diff --git a/core/views/survex.py b/core/views/survex.py index c07ce2d..610ee47 100644 --- a/core/views/survex.py +++ b/core/views/survex.py @@ -3,6 +3,7 @@ import os import datetime import difflib from pathlib import Path +import socket from django import forms from django.http import HttpResponseRedirect, HttpResponse, Http404 @@ -165,7 +166,11 @@ class SvxForm(forms.Form): res = fout.write("\n") fout.close() - only_commit(fname, f"Online survex edit: {self.data['filename']}.svx") + if socket.gethostname() == "expo": + comment = f"Online survex edit: {self.data['filename']}.svx" + else: + comment = f"Online survex edit: {self.data['filename']}.svx on dev machine '{socket.gethostname()}' " + only_commit(fname, comment) return "SAVED and committed to git" -- cgit v1.2.3