diff options
Diffstat (limited to 'parsers')
-rw-r--r-- | parsers/imports.py | 7 | ||||
-rw-r--r-- | parsers/survex.py | 5 |
2 files changed, 10 insertions, 2 deletions
diff --git a/parsers/imports.py b/parsers/imports.py index ac671dc..62e7e84 100644 --- a/parsers/imports.py +++ b/parsers/imports.py @@ -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 diff --git a/parsers/survex.py b/parsers/survex.py index 1f96d6b..27053cd 100644 --- a/parsers/survex.py +++ b/parsers/survex.py @@ -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: |