summaryrefslogtreecommitdiffstats
path: root/core/views/scans.py
diff options
context:
space:
mode:
authorPhilip Sargent <philip.sargent@klebos.com>2022-09-20 02:36:40 +0300
committerPhilip Sargent <philip.sargent@klebos.com>2022-09-20 02:36:40 +0300
commit36995ec05169974139fbfd6b768e6e935d97ab46 (patch)
treefc3c3865ffb4d493c68abbbf67b56473c1a39b2e /core/views/scans.py
parent61f9863a068a0e2d128a100088cf42c0c61c97ab (diff)
downloadtroggle-36995ec05169974139fbfd6b768e6e935d97ab46.tar.gz
troggle-36995ec05169974139fbfd6b768e6e935d97ab46.tar.bz2
troggle-36995ec05169974139fbfd6b768e6e935d97ab46.zip
handling survex files not linked in completely
Diffstat (limited to 'core/views/scans.py')
-rw-r--r--core/views/scans.py20
1 files changed, 11 insertions, 9 deletions
diff --git a/core/views/scans.py b/core/views/scans.py
index f641423..80b334d 100644
--- a/core/views/scans.py
+++ b/core/views/scans.py
@@ -35,6 +35,9 @@ add this file in to the todo list thinggy.
def populatewallet(w):
'''Copy survex data here just for display, not permanently
+
+ Only gets data from the survex file when it was parsed on import..
+ so doesn't work if there is no *ref value
'''
survexpeople = []
blocks = SurvexBlock.objects.filter(scanswallet = w)
@@ -76,16 +79,15 @@ def caveifywallet(w):
w.displaynames = blocknames
def fillblankpeople(w):
- # this isn't working..? why?
+ # this isn't working..? why? Because it needs a *ref and an import
wp = w.people()
- if not wp: # an -empty list
- populatewallet(w)
- else:
- w.persons = wp
- if len(wp) == 1:
- nobody = wp[0].lower()
- if nobody == 'unknown' or nobody == 'nobody' or nobody == ' ' or nobody == '':
- populatewallet(w)
+ w.persons = wp
+ if len(wp) == 1:
+ # print(f' - {wp=}')
+ nobody = wp[0].lower()
+ if nobody == 'unknown' or nobody == 'nobody' or nobody == ' ' or nobody == '':
+ print(f' - {wp=} {nobody=}')
+ populatewallet(w)
def fillblankothers(w):
earliest = datetime.datetime.now().date()