forked from expo/troggle
save connection between cave and entrances, before writing out the cavedata file
This commit is contained in:
parent
761a71930b
commit
380565c6f5
@ -478,14 +478,13 @@ def edit_entrance(request, path="", caveslug=None, entslug=None):
|
|||||||
entrance.cached_primary_slug = slugname
|
entrance.cached_primary_slug = slugname
|
||||||
entrance.filename = slugname + ".html"
|
entrance.filename = slugname + ".html"
|
||||||
entrance.save()
|
entrance.save()
|
||||||
|
entrance_letter.entrance = entrance
|
||||||
|
entrance_letter.save()
|
||||||
|
|
||||||
entrance_file = entrance.file_output()
|
entrance_file = entrance.file_output()
|
||||||
print(f"Online edit of entrance {entrance.slug}")
|
print(f"Online edit of entrance {entrance.slug}")
|
||||||
cave_file = cave.file_output()
|
cave_file = cave.file_output()
|
||||||
entrance.save()
|
|
||||||
write_and_commit([entrance_file, cave_file], f"Online edit of entrance {entrance.slug}")
|
write_and_commit([entrance_file, cave_file], f"Online edit of entrance {entrance.slug}")
|
||||||
entrance_letter.entrance = entrance
|
|
||||||
if entslug is None:
|
|
||||||
entrance_letter.save()
|
|
||||||
return HttpResponseRedirect("/" + cave.url)
|
return HttpResponseRedirect("/" + cave.url)
|
||||||
else:
|
else:
|
||||||
if entrance:
|
if entrance:
|
||||||
|
Loading…
Reference in New Issue
Block a user