2
0
mirror of https://expo.survex.com/repositories/troggle/.git synced 2024-11-25 08:41:51 +00:00

starting jsn population when we know the data

This commit is contained in:
Philip Sargent 2022-07-29 17:49:07 +03:00
parent 7872e98cb2
commit bc3da1182b

View File

@ -59,6 +59,22 @@ wallet_blank_html = '''<html><body><H1>Wallet WALLET</H1>
</UL>
</body></html>
'''
def CheckEmptyDate(wallet):
'''If date is not set, get it from a linked survex file. If several, pick the earliest.
Maybe also look at filedates for the scans in expofiles/surveyscans/ , but these can be re-set by copying.
'''
return
def CheckEmptyPeople(wallet):
'''If people list is empty, copy them from the survex files: all of them
To be a Troggle model change; a many:many relationship between wallets and people,
as well as being a list in the JSON file (which is the permanent repository). We want the many:many
relationship so that we can filter wallets based on a person.
'''
return
def LoadListScansFile(wallet):
gld = [ ]
@ -156,6 +172,8 @@ def load_all_scans():
# line 347 of view/uploads.py and needs refactoring for loading contentsjson
wallet.save()
LoadListScansFile(wallet)
CheckEmptyDate(wallet)
CheckEmptyPeople(wallet)
CopyWalletData(wallet)
# what is this?