forked from expo/troggle
reanme manyscansfolders to manywallets
This commit is contained in:
@@ -473,13 +473,13 @@ class LoadingSurvex():
|
||||
message = " ! Wallet *REF {} - not numeric in '{}'".format(refscan, survexblock.survexfile.path)
|
||||
print((self.insp+message))
|
||||
DataIssue.objects.create(parser='survex', message=message)
|
||||
manyscansfolders = Wallet.objects.filter(walletname=refscan)
|
||||
if manyscansfolders:
|
||||
survexblock.scansfolder = manyscansfolders[0] # this is a ForeignKey field
|
||||
print(manyscansfolders[0])
|
||||
manywallets = Wallet.objects.filter(walletname=refscan)
|
||||
if manywallets:
|
||||
survexblock.scansfolder = manywallets[0] # this is a ForeignKey field
|
||||
print(manywallets[0])
|
||||
survexblock.save()
|
||||
if len(manyscansfolders) > 1:
|
||||
message = " ! Wallet *REF {} - {} scan folders from DB search in {}".format(refscan, len(manyscansfolders), survexblock.survexfile.path)
|
||||
if len(manywallets) > 1:
|
||||
message = " ! Wallet *REF {} - {} scan folders from DB search in {}".format(refscan, len(manywallets), survexblock.survexfile.path)
|
||||
print((self.insp+message))
|
||||
DataIssue.objects.create(parser='survex', message=message)
|
||||
else:
|
||||
|
||||
@@ -89,11 +89,11 @@ def LoadListScans():
|
||||
print(' - deleting all scansFolder and scansSingle objects')
|
||||
|
||||
# first do the smkhs (large kh survey scans) directory
|
||||
manyscansfoldersmkhs = Wallet(fpath=os.path.join(settings.SURVEY_SCANS, "../surveys/smkhs"), walletname="smkhs")
|
||||
manywallets_smkhs = Wallet(fpath=os.path.join(settings.SURVEY_SCANS, "../surveys/smkhs"), walletname="smkhs")
|
||||
print("smkhs", end=' ')
|
||||
if os.path.isdir(manyscansfoldersmkhs.fpath):
|
||||
manyscansfoldersmkhs.save()
|
||||
LoadListScansFile(manyscansfoldersmkhs)
|
||||
if os.path.isdir(manywallets_smkhs.fpath):
|
||||
manywallets_smkhs.save()
|
||||
LoadListScansFile(manywallets_smkhs)
|
||||
|
||||
|
||||
# iterate into the surveyscans directory
|
||||
@@ -144,7 +144,7 @@ def find_tunnel_scan(dwgfile, path):
|
||||
scansfile = scansfilel[0]
|
||||
|
||||
if scansfolder:
|
||||
dwgfile.manyscansfolders.add(scansfolder)
|
||||
dwgfile.manywallets.add(scansfolder)
|
||||
if scansfile:
|
||||
dwgfile.scans.add(scansfile)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user