forked from expo/troggle
Better display of wallet names copied from svx files
This commit is contained in:
@@ -55,12 +55,21 @@ def caveifywallet(w):
|
||||
'''Gets the cave from the list of survex files,
|
||||
only selects one of them though. Only used for display.
|
||||
'''
|
||||
blocknames = []
|
||||
blocks = SurvexBlock.objects.filter(scanswallet = w)
|
||||
for b in blocks:
|
||||
# NB b.cave is not populated by parser. Use b.survexfile.cave instead, or we could parse b.survexpath
|
||||
if b.survexfile.cave:
|
||||
w.cave = b.survexfile.cave # just gets the last one, randomly. SHould make this a list or many:many ideally
|
||||
|
||||
if b.name:
|
||||
blocknames.append(b.name)
|
||||
|
||||
if w.name():
|
||||
w.displaynames = [w.name()]
|
||||
else:
|
||||
w.displaynames = blocknames
|
||||
|
||||
def fillblankpeople(w):
|
||||
wp = w.people()
|
||||
if not wp: # an -empty list
|
||||
|
||||
Reference in New Issue
Block a user