forked from expo/troggle
Fix wallets scan upload faults
This commit is contained in:
@@ -18,7 +18,7 @@ from troggle.core.utils import save_carefully, GetListDir
|
||||
for tunnel and therion files
|
||||
'''
|
||||
|
||||
todo='''
|
||||
todo='''Rename functions more consistently between tunnel and therion variants
|
||||
'''
|
||||
|
||||
def find_dwg_file(dwgfile, path):
|
||||
@@ -104,7 +104,7 @@ def findwalletimage(therionfile, foundpath):
|
||||
else:
|
||||
message = f'! Scanned file {scanfilename} mentioned in "{therionfile.dwgpath}" is not actually found in {wallet.walletname}'
|
||||
wurl = f'/survey_scans/{wallet.walletname}/'.replace("#",":")
|
||||
print(message)
|
||||
# print(message)
|
||||
DataIssue.objects.create(parser='Therion', message=message, url = wurl)
|
||||
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ from troggle.core.views.scans import datewallet
|
||||
'''
|
||||
|
||||
contentsjson = "contents.json"
|
||||
indexhtml = "walletindex.html"
|
||||
#indexhtml = "walletindex.html"
|
||||
git = settings.GIT
|
||||
|
||||
# to do: create a 'low priority' field, so that any such wallet does not appear in summary reports
|
||||
@@ -44,22 +44,22 @@ wallet_blank_json = {
|
||||
"survex not required": False,
|
||||
"website updated": False}
|
||||
|
||||
wallet_blank_html = '''<html><body><H1>Wallet WALLET</H1>
|
||||
<p>List of trips: <a href="http://expo.survex.com/expedition/YEAR">expedition/YEAR</a>
|
||||
- troggle-processed .svx files and logbook entries on server</p>
|
||||
<p>Date: </p><p>People: Unknown,</p>
|
||||
<p>Cave <a href='http://expo.survex.com/caves/'>Guidebook description</a>
|
||||
- A description is indicated as being needed, so may need adding into this cave page.
|
||||
<p>Survex file: not identified yet
|
||||
<H2>Issues</H2>
|
||||
<p>The description needs writing</p>
|
||||
<p>The QMs needs writing</p><p>The website is marked as needing updating (using the guidebook description)</p>
|
||||
<p>Tunnel / Therion drawing files need drawing</p>
|
||||
<H2>Files</H2>
|
||||
<UL>
|
||||
</UL>
|
||||
</body></html>
|
||||
'''
|
||||
# wallet_blank_html = '''<html><body><H1>Wallet WALLET</H1>
|
||||
# <p>List of trips: <a href="http://expo.survex.com/expedition/YEAR">expedition/YEAR</a>
|
||||
# - troggle-processed .svx files and logbook entries on server</p>
|
||||
# <p>Date: </p><p>People: Unknown,</p>
|
||||
# <p>Cave <a href='http://expo.survex.com/caves/'>Guidebook description</a>
|
||||
# - A description is indicated as being needed, so may need adding into this cave page.
|
||||
# <p>Survex file: not identified yet
|
||||
# <H2>Issues</H2>
|
||||
# <p>The description needs writing</p>
|
||||
# <p>The QMs needs writing</p><p>The website is marked as needing updating (using the guidebook description)</p>
|
||||
# <p>Tunnel / Therion drawing files need drawing</p>
|
||||
# <H2>Files</H2>
|
||||
# <UL>
|
||||
# </UL>
|
||||
# </body></html>
|
||||
# '''
|
||||
|
||||
def CheckEmptyDate(wallet):
|
||||
'''If date is not set, get it from a linked survex file.
|
||||
|
||||
@@ -1528,6 +1528,12 @@ def LoadSurvexBlocks():
|
||||
survexblockroot = SurvexBlock(name=ROOTBLOCK, survexpath="", cave=None, survexfile=survexfileroot,
|
||||
legsall=0, legslength=0.0)
|
||||
# crashes here sometimes on MariaDB complaining that cave_id should not be null. But it should be.
|
||||
#django.db.utils.IntegrityError: (1048, "Column 'cave_id' cannot be null")
|
||||
# fix by restarting db on server
|
||||
# sudo service mariadb stop
|
||||
# sudo service mariadb start
|
||||
|
||||
|
||||
survexblockroot.save()
|
||||
|
||||
print(' - Loading Survex Blocks...')
|
||||
|
||||
Reference in New Issue
Block a user