From 380565c6f51cf413167416a69f75026e01056cfc Mon Sep 17 00:00:00 2001 From: Martin Green Date: Mon, 24 Jul 2023 23:03:12 +0100 Subject: [PATCH] save connection between cave and entrances, before writing out the cavedata file --- core/views/caves.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/core/views/caves.py b/core/views/caves.py index 82ab5d2..5b34551 100644 --- a/core/views/caves.py +++ b/core/views/caves.py @@ -478,14 +478,13 @@ def edit_entrance(request, path="", caveslug=None, entslug=None): entrance.cached_primary_slug = slugname entrance.filename = slugname + ".html" entrance.save() + entrance_letter.entrance = entrance + entrance_letter.save() + entrance_file = entrance.file_output() print(f"Online edit of entrance {entrance.slug}") cave_file = cave.file_output() - entrance.save() 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) else: if entrance: