diff options
Diffstat (limited to 'core/views/scans.py')
-rw-r--r-- | core/views/scans.py | 9 |
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 |