mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2024-11-21 23:01:52 +00:00
before big revision to wallet model code
This commit is contained in:
parent
2b96086535
commit
1694d01536
@ -52,8 +52,7 @@ def populatewallet(w):
|
||||
|
||||
|
||||
def caveifywallet(w):
|
||||
"""Gets the caves from the list of survex files,
|
||||
If called from survex parser, we never need to call it from a view too.
|
||||
"""Gets the block names from the list of blocks, set by the survex parser
|
||||
"""
|
||||
# print(f' - Caveify {w=}')
|
||||
blocknames = []
|
||||
@ -133,15 +132,16 @@ def is_cave(wallet, id):
|
||||
return False
|
||||
|
||||
def fillblankothers(w):
|
||||
"""This is on the way to having a many:many relationship between Caves and Wallets
|
||||
"""
|
||||
# has this already been done? Do we need to do it on every refresh ?
|
||||
if not w.walletdate:
|
||||
set_walletdate(w)
|
||||
|
||||
Gcavelookup = GetCaveLookup()
|
||||
|
||||
caveifywallet(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:
|
||||
@ -338,8 +338,6 @@ def cavewallets(request, caveid):
|
||||
else:
|
||||
return render(request, "errors/badslug.html", {"badslug": f"{caveid} - from cavewallets()"})
|
||||
|
||||
|
||||
# or now:
|
||||
wallets = cave.wallets.all()
|
||||
manywallets = list(set(wallets))
|
||||
for w in manywallets:
|
||||
|
Loading…
Reference in New Issue
Block a user