From e1eb85969ae04fd457e8a3f21284488a348eb1f0 Mon Sep 17 00:00:00 2001 From: Philip Sargent Date: Thu, 14 Mar 2024 23:59:39 +0000 Subject: next year auto for wallets --- core/views/scans.py | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) (limited to 'core/views/scans.py') diff --git a/core/views/scans.py b/core/views/scans.py index f80f08c..2714716 100644 --- a/core/views/scans.py +++ b/core/views/scans.py @@ -137,22 +137,23 @@ def fillblankothers(w): # Is this not done when we scan for wallets when we create them in the first place ? # needs to be refactored into models/wallets.py anyway wcaveid = w.cave() - if not wcaveid or wcaveid == "": - if type(wcaveid) == list: - for i in wcaveid: - i = i.strip("' []\"") - if is_cave(w,i): - w.caves.add(Gcavelookup[i]) - elif wcaveid.find(',') != -1: - # it's a list of cave ids as a string - ids = wcaveid.split(',') - for i in ids: - i = i.strip("' []\"") - if is_cave(w,i): + if wcaveid: + if wcaveid == "": + if type(wcaveid) == list: + for i in wcaveid: + i = i.strip("' []\"") + if is_cave(w,i): + w.caves.add(Gcavelookup[i]) + elif wcaveid.find(',') != -1: + # it's a list of cave ids as a string + ids = wcaveid.split(',') + for i in ids: + i = i.strip("' []\"") + if is_cave(w,i): + w.caves.add(Gcavelookup[i]) + else: + if is_cave(w,wcaveid): w.caves.add(Gcavelookup[i]) - else: - if is_cave(w,wcaveid): - w.caves.add(Gcavelookup[i]) def fixsurvextick(w, ticks): -- cgit v1.2.3