diff options
author | Philip Sargent <philip.sargent@gmail.com> | 2023-10-21 16:22:20 +0300 |
---|---|---|
committer | Philip Sargent <philip.sargent@gmail.com> | 2023-10-21 16:22:20 +0300 |
commit | e7a0c57330a9c3808531b4d401d0cedf0f0c0638 (patch) | |
tree | 83eea4cf4da7a90b1f9062bf1988ef45f9d3ef5c /parsers/scans.py | |
parent | 24029be7d3406e4c3ce7790c066b4ad6033c4202 (diff) | |
download | troggle-e7a0c57330a9c3808531b4d401d0cedf0f0c0638.tar.gz troggle-e7a0c57330a9c3808531b4d401d0cedf0f0c0638.tar.bz2 troggle-e7a0c57330a9c3808531b4d401d0cedf0f0c0638.zip |
wallets & caves now many:many
Diffstat (limited to 'parsers/scans.py')
-rw-r--r-- | parsers/scans.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/parsers/scans.py b/parsers/scans.py index d091a3d..378db66 100644 --- a/parsers/scans.py +++ b/parsers/scans.py @@ -24,6 +24,9 @@ def set_JSONwalletdate(wallet): we cannot get dates from them. There are about 40 JSON files (in 2022) which we read here.""" _ = wallet.date() # don't need return value. Sets .walletdate as side effect +def set_caves(wallet): + _ = wallet.allcaves() # don't need return value. Just calling this saves it as w.caves This ONLY gets the list on the wallet JSON + def load_all_scans(): """This iterates through the scans directories (either here or on the remote server) and builds up the models we can access later. @@ -114,6 +117,7 @@ def load_all_scans(): wallet = Wallet(fpath=fpath, walletname=walletname) set_walletyear(wallet) wallet.save() + set_caves(wallet) wallets[walletname] = wallet singlescan = SingleScan(ffile=fpath, name=p.name, wallet=wallet) @@ -159,6 +163,7 @@ def load_all_scans(): # BUT can't check linked survex blocks as they haven't been imported yet set_JSONwalletdate(wallet) set_walletyear(wallet) + set_caves(wallet) if not created: print( f"\n - {walletname} was not created, but was not in directory walk of /surveyscans/. Who created it?" |