summaryrefslogtreecommitdiffstats
path: root/core/views/scans.py
diff options
context:
space:
mode:
authorPhilip Sargent <philip.sargent@klebos.com>2022-08-24 18:28:15 +0300
committerPhilip Sargent <philip.sargent@klebos.com>2022-08-24 18:28:15 +0300
commit7e9fd0f353e26cb3440f8658d5da7b9f1992af82 (patch)
tree693a3096dc153bac115e6dd0eb40c46e2b29b945 /core/views/scans.py
parent8ca50d8fd4f6ce431033405141946fe6e525f2db (diff)
downloadtroggle-7e9fd0f353e26cb3440f8658d5da7b9f1992af82.tar.gz
troggle-7e9fd0f353e26cb3440f8658d5da7b9f1992af82.tar.bz2
troggle-7e9fd0f353e26cb3440f8658d5da7b9f1992af82.zip
Better display of wallet names copied from svx files
Diffstat (limited to 'core/views/scans.py')
-rw-r--r--core/views/scans.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/core/views/scans.py b/core/views/scans.py
index 8c380c1..7274563 100644
--- a/core/views/scans.py
+++ b/core/views/scans.py
@@ -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