2
0
mirror of https://expo.survex.com/repositories/troggle/.git synced 2024-11-22 07:11:52 +00:00

update pendingcaves only on local dev machine

This commit is contained in:
Philip Sargent 2023-08-03 12:06:35 +03:00
parent 0efdfe66d5
commit 0dfe9d94b2

View File

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