detecting empty wallets where we only have JSON and no files

This commit is contained in:
Philip Sargent
2022-08-16 20:02:28 +03:00
parent e94dc6eb6f
commit 41c68aef26
3 changed files with 29 additions and 6 deletions

View File

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