forked from expo/troggle
Fix needed for pending caves with no xml file
This commit is contained in:
parent
ae892a07d4
commit
514887d19f
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user