forked from expo/troggle
handling survex files not linked in completely
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user