mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2025-12-17 10:17:19 +00:00
partially fixing results from create entrance bug (not fixed)
This commit is contained in:
@@ -855,6 +855,7 @@ def read_cave(filename, mvf=None, cave=None):
|
|||||||
manual_edit = False
|
manual_edit = False
|
||||||
|
|
||||||
# The Cave object should already have been created when reading the entrance_data file
|
# The Cave object should already have been created when reading the entrance_data file
|
||||||
|
# But what if there is no Entrance (yet) ? Then the cave won't exist.
|
||||||
caves = Cave.objects.filter(filename=filename)
|
caves = Cave.objects.filter(filename=filename)
|
||||||
if len(caves) ==1:
|
if len(caves) ==1:
|
||||||
cave = caves[0]
|
cave = caves[0]
|
||||||
@@ -864,7 +865,11 @@ def read_cave(filename, mvf=None, cave=None):
|
|||||||
cave = c[0]
|
cave = c[0]
|
||||||
else:
|
else:
|
||||||
print(f" * Cannot find single Cave object for cave_data/{filename} from entrance_data file. {len(caves)} found")
|
print(f" * Cannot find single Cave object for cave_data/{filename} from entrance_data file. {len(caves)} found")
|
||||||
return False
|
message = f' * {slug:12} Cannot find single Cave object for cave_data/{filename} from entrance_data file. {len(caves)} found. "'
|
||||||
|
DataIssue.objects.create(parser="caves", message=message, url=f"/{slug[0:4]}/{slug}_cave_edit/")
|
||||||
|
print(message)
|
||||||
|
cave = make_cave(slug)
|
||||||
|
# return False
|
||||||
|
|
||||||
|
|
||||||
# From here on the code applies to both edited and newly-imported caves (mostly!)
|
# From here on the code applies to both edited and newly-imported caves (mostly!)
|
||||||
|
|||||||
Reference in New Issue
Block a user