From 0dfe9d94b2114d7709ae24c0f859127745ffa524 Mon Sep 17 00:00:00 2001 From: Philip Sargent Date: Thu, 3 Aug 2023 12:06:35 +0300 Subject: update pendingcaves only on local dev machine --- parsers/caves.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'parsers/caves.py') diff --git a/parsers/caves.py b/parsers/caves.py index b68eee0..8a746ac 100644 --- a/parsers/caves.py +++ b/parsers/caves.py @@ -726,9 +726,11 @@ def read_cave(filename, cave=None): def add_cave_to_pending_list(id): fpending = Path(CAVEDESCRIPTIONS, "pendingcaves.txt") - if fpending.is_file(): - with open(fpending, "a") as pend: - pend.write(f"{id}\n") + 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. -- cgit v1.2.3