Imports in control panel work again

This commit is contained in:
Philip Sargent
2021-04-27 20:44:24 +01:00
parent 821aaa1f66
commit 5e478c7eb0
5 changed files with 106 additions and 54 deletions

View File

@@ -15,7 +15,8 @@ import troggle.parsers.surveys
import troggle.parsers.logbooks
import troggle.parsers.QMs
'''Master data importUsed only by databaseReset.py currently
'''Master data import.
Used only by databaseReset.py and online controlpanel.
'''
def import_caves():
@@ -46,9 +47,9 @@ def import_QMs():
def import_survex():
# when this import is moved to the top with the rest it all crashes horribly
print("-- Importing Survex and Entrance Positions")
with transaction.atomic():
import troggle.parsers.survex
print("-- Importing Survex and Entrance Positions")
print(" - Survex Blocks")
with transaction.atomic():
troggle.parsers.survex.LoadSurvexBlocks()