From 514887d19ff3553e4ef5949fcc80a76690ef8729 Mon Sep 17 00:00:00 2001 From: Philip Sargent Date: Tue, 30 Jun 2020 17:59:53 +0100 Subject: [PATCH] Fix needed for pending caves with no xml file --- parsers/caves.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/parsers/caves.py b/parsers/caves.py index ff87bcd..d1e7406 100644 --- a/parsers/caves.py +++ b/parsers/caves.py @@ -30,13 +30,14 @@ def readcaves(): try: cave = models_caves.Cave( unofficial_number = k, - official_name = "Pending cave write-up - creating as empty object. No XML file available yet.", - notes="_Survex file found in loser repo but no description in expoweb") +# official_name = "", + underground_description = "Pending cave write-up - creating as empty object. No XML file available yet.", + notes="_Survex file found in loser repo but no description in expoweb") if cave: cave.save() # must save to have id before foreign keys work cave.area = area_1623 cave.save() - message = " ! {} {}".format(cave.unofficial_number, cave.official_name) + message = " ! {} {}".format(cave.unofficial_number, cave.underground_description) DataIssue.objects.create(parser='caves', message=message) print(message) else: