summaryrefslogtreecommitdiffstats
path: root/core/views/scans.py
diff options
context:
space:
mode:
authorPhilip Sargent <philip.sargent@klebos.com>2022-10-06 21:37:09 +0300
committerPhilip Sargent <philip.sargent@klebos.com>2022-10-06 21:37:09 +0300
commit1f70b7773565310194ca9e8251794ee04eae6509 (patch)
treeeb3ac8ed5095c0e29d48bccb0a005558db7e0138 /core/views/scans.py
parent4a349865986f8f6287659f3868a6bc6bf209def8 (diff)
downloadtroggle-1f70b7773565310194ca9e8251794ee04eae6509.tar.gz
troggle-1f70b7773565310194ca9e8251794ee04eae6509.tar.bz2
troggle-1f70b7773565310194ca9e8251794ee04eae6509.zip
fix crash when people put a list of cave ids in a wallet
Diffstat (limited to 'core/views/scans.py')
-rw-r--r--core/views/scans.py13
1 files changed, 9 insertions, 4 deletions
diff --git a/core/views/scans.py b/core/views/scans.py
index aea8559..aa6181a 100644
--- a/core/views/scans.py
+++ b/core/views/scans.py
@@ -105,11 +105,16 @@ def fillblankothers(w):
if not wcaveid or wcaveid == "":
caveifywallet(w)
else:
- if wcaveid in Gcavelookup:
- w.caveobj = Gcavelookup[wcaveid]
- # print(f' - Found cave object from id {wcaveid}')
+ if type(wcaveid) == list:
+ for i in wcaveid:
+ if i in Gcavelookup:
+ w.caveobj = Gcavelookup[i] # just sets it to the last one found. nasty. bug waiting to happen
+ #print(f' - Found cave object from id {wcaveid}')
else:
- print(f' - Failed to find cave object from id {wcaveid}')
+ if wcaveid in Gcavelookup:
+ w.caveobj = Gcavelookup[wcaveid]
+ else:
+ print(f' - Failed to find cave object from id {wcaveid}')
def fixsurvextick(w, ticks):