summaryrefslogtreecommitdiffstats
path: root/core/views
diff options
context:
space:
mode:
authorPhilip Sargent <philip.sargent@gmail.com>2023-09-10 02:06:38 +0300
committerPhilip Sargent <philip.sargent@gmail.com>2023-09-10 02:06:38 +0300
commit327b1923b06bd4789df7ad0be4976e7d63c3aad5 (patch)
treebc85d886da99719ab4b8bc97a2f9d81996cc9d64 /core/views
parent54136721b8ef4c10be6efa70dd8c8e48f7d561fb (diff)
downloadtroggle-327b1923b06bd4789df7ad0be4976e7d63c3aad5.tar.gz
troggle-327b1923b06bd4789df7ad0be4976e7d63c3aad5.tar.bz2
troggle-327b1923b06bd4789df7ad0be4976e7d63c3aad5.zip
Cleaning auto Cave creation from survex file detection
Diffstat (limited to 'core/views')
-rw-r--r--core/views/scans.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/core/views/scans.py b/core/views/scans.py
index f7abc06..b998b27 100644
--- a/core/views/scans.py
+++ b/core/views/scans.py
@@ -95,7 +95,7 @@ def is_cave(id):
print(f" - Failed to find cave object from id <{id}>")
if id.lower() != "unknown" and id != "":
print(f" - adding <{id}> to pendingcaves.txt list")
- add_cave_to_pending_list(id)
+ add_cave_to_pending_list(id, f"Could not find id <{id}>")
return False
def fillblankothers(w):
@@ -275,6 +275,11 @@ def cavewallets(request, caveid):
if str(fcave.slug()) == caveid:
# print(f' - Found one ! {z.walletname=} {zcaveid=}')
wallets.add(z)
+ elif f"1623-{cleanid}" in Gcavelookup: # special hack for all the old wallets which are 1623
+ fcave = Gcavelookup[f"1623-{cleanid}"]
+ if str(fcave.slug()) == caveid:
+ # print(f' - Found one ! {z.walletname=} {zcaveid=}')
+ wallets.add(z)
elif cleanid in ['surface', 'unknown', '']:
message = f" ! In {z.walletname} ignore '{cleanid}' "
print(message)
@@ -284,7 +289,7 @@ def cavewallets(request, caveid):
message = f" ! In {z.walletname} there is an unrecognised cave name '{cleanid}', adding to pending list."
print(message)
DataIssue.objects.update_or_create(parser="scans", message=message, url=wurl)
- add_cave_to_pending_list(cleanid)
+ add_cave_to_pending_list(cleanid, f"an unrecognised cave name in {z.walletname}")
manywallets = list(set(wallets))
for w in manywallets: