2
0
mirror of https://expo.survex.com/repositories/troggle/.git synced 2025-12-15 08:37:14 +00:00

bug fix for server

This commit is contained in:
2023-08-05 18:54:20 +03:00
parent 12aa6ced86
commit 99ff7c741b

View File

@@ -730,11 +730,14 @@ def read_cave(filename, cave=None):
def add_cave_to_pending_list(id): def add_cave_to_pending_list(id):
fpending = Path(CAVEDESCRIPTIONS, "pendingcaves.txt") fpending = Path(CAVEDESCRIPTIONS, "pendingcaves.txt")
if settings.DBSWITCH == "sqlite": # dev machine only try:
if fpending.is_file(): if settings.DBSWITCH == "sqlite": # dev machine only
with open(fpending, "a") as pend: if fpending.is_file():
pend.write(f"{id}\n") with open(fpending, "a") as pend:
# now need to do the git commit thing if running on server. pend.write(f"{id}\n")
# now need to do the git commit thing if running on server.
except:
pass
def readcaves(): def readcaves():
"""Called from databaseReset mass importer. """Called from databaseReset mass importer.