mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2025-12-16 08:47:12 +00:00
wallets & caves now many:many
This commit is contained in:
@@ -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?"
|
||||
|
||||
Reference in New Issue
Block a user