forked from expo/troggle
diagnosing missing entrance file
This commit is contained in:
@@ -63,6 +63,13 @@ def import_survex():
|
||||
with transaction.atomic():
|
||||
troggle.parsers.survex.LoadPositions()
|
||||
|
||||
def import_ents():
|
||||
# when this import is moved to the top with the rest it all crashes horribly
|
||||
print(" - Survex entrances x/y/z Positions")
|
||||
with transaction.atomic():
|
||||
import troggle.parsers.survex
|
||||
troggle.parsers.survex.LoadPositions()
|
||||
|
||||
def import_loadpos():
|
||||
# when this import is moved to the top with the rest it all crashes horribly
|
||||
import troggle.parsers.survex
|
||||
|
||||
@@ -69,13 +69,14 @@ class MapLocations(object):
|
||||
def points(self):
|
||||
for ent in Entrance.objects.all():
|
||||
if ent.best_station():
|
||||
print(f"{ent.filename}", end=", ")
|
||||
try:
|
||||
k = ent.caveandentrance_set.all()[0].cave
|
||||
except:
|
||||
message = f" ! Failed to get Cave linked to Entrance:{ent.name} from:{ent.filename} best:{ent.best_station()}"
|
||||
message = f" ! Failed to get Cave linked to Entrance:{ent.name} from:{ent.filename} best:{ent.best_station()} {ent.caveandentrance_set.all()}"
|
||||
DataIssue.objects.create(parser='entrances', message=message)
|
||||
print(message)
|
||||
raise
|
||||
continue # skip this entrance
|
||||
try:
|
||||
areaName = k.getArea().short_name
|
||||
except:
|
||||
|
||||
Reference in New Issue
Block a user