summaryrefslogtreecommitdiffstats
path: root/parsers/scans.py
diff options
context:
space:
mode:
authorPhilip Sargent <philip.sargent@klebos.com>2022-07-29 17:49:07 +0300
committerPhilip Sargent <philip.sargent@klebos.com>2022-07-29 17:49:07 +0300
commitbc3da1182bf82ce59b0195ea0496ca123c544438 (patch)
treed495b697a6b9ded8c88fa8182c0069e4a2649036 /parsers/scans.py
parent7872e98cb2a8f8b087afab4c7a93d5ba71624fd2 (diff)
downloadtroggle-bc3da1182bf82ce59b0195ea0496ca123c544438.tar.gz
troggle-bc3da1182bf82ce59b0195ea0496ca123c544438.tar.bz2
troggle-bc3da1182bf82ce59b0195ea0496ca123c544438.zip
starting jsn population when we know the data
Diffstat (limited to 'parsers/scans.py')
-rw-r--r--parsers/scans.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/parsers/scans.py b/parsers/scans.py
index 8b8f92f..b78f76f 100644
--- a/parsers/scans.py
+++ b/parsers/scans.py
@@ -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?