mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2025-12-14 18:37:18 +00:00
caves->wallets at parse time
This commit is contained in:
@@ -2481,6 +2481,17 @@ def MakeFileRoot(svxpath):
|
||||
|
||||
return fileroot
|
||||
|
||||
def caveifywallets():
|
||||
"""Gets the caves from the list of survexblocks
|
||||
"""
|
||||
wallets = Wallet.objects.all()
|
||||
for w in wallets:
|
||||
blocks = SurvexBlock.objects.filter(scanswallet=w)
|
||||
for b in blocks:
|
||||
# NB b.cave is not populated by parser. Use b.survexfile.cave instead, or we could parse b.survexpath
|
||||
if b.survexfile.cave:
|
||||
w.caves.add(b.survexfile.cave)
|
||||
|
||||
|
||||
def LoadSurvexBlocks():
|
||||
global dup_includes
|
||||
@@ -2536,4 +2547,6 @@ def LoadSurvexBlocks():
|
||||
if dup_includes > 0:
|
||||
print(f" - ERROR: There are {dup_includes} duplicate *includes in the final list")
|
||||
print(" - Loaded All Survex Blocks.")
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user