summaryrefslogtreecommitdiffstats
path: root/parsers/caves.py
diff options
context:
space:
mode:
authorPhilip Sargent <philip.sargent@klebos.com>2021-04-28 02:43:09 +0100
committerPhilip Sargent <philip.sargent@klebos.com>2021-04-28 02:43:09 +0100
commite5cf1b5289d908133bcfbc7054b0eda1e658dbfd (patch)
treea8b535d79b33c2d9764312ec611def791e91add4 /parsers/caves.py
parent62799d196b9f2558a769ddef4311fd1f06a8c99e (diff)
downloadtroggle-e5cf1b5289d908133bcfbc7054b0eda1e658dbfd.tar.gz
troggle-e5cf1b5289d908133bcfbc7054b0eda1e658dbfd.tar.bz2
troggle-e5cf1b5289d908133bcfbc7054b0eda1e658dbfd.zip
download logbook in standard HTML works
Diffstat (limited to 'parsers/caves.py')
-rw-r--r--parsers/caves.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/parsers/caves.py b/parsers/caves.py
index 50086ea..3b96d69 100644
--- a/parsers/caves.py
+++ b/parsers/caves.py
@@ -19,7 +19,7 @@ django.db.transaction.TransactionManagementError:
An error occurred in the current transaction. You can't execute queries until the end of the 'atomic' block.
'''
-todo='''- Update does not work when a cave id is in the pending list but a proper cave description file exists
+todo='''- db Update does not work when a cave id is in the pending list but a proper cave description file exists
and is being imported. It should work. But currently Django aborts and he file is not read in.
- Cannot use Edit This Page for pendingcaves.txt_edit as Edit This Page is expecting an html file.
@@ -139,13 +139,13 @@ def readcaves():
'''
# For those caves which do not have cave_data/1623-xxx.html XML files even though they exist and have surveys
# should put this in a simple list which can be edited using 'Edit this file'
- pending = []
+ pending = set()
fpending = Path(settings.CAVEDESCRIPTIONS, "pendingcaves.txt")
if fpending.is_file():
with open(fpending, "r") as fo:
cids = fo.readlines()
for cid in cids:
- pending.append(cid.rstrip('\n'))
+ pending.add(cid.rstrip('\n'))
with transaction.atomic():
print(" - Deleting Caves and Entrances")