diff --git a/core/views/caves.py b/core/views/caves.py index 0d69b74..c468362 100644 --- a/core/views/caves.py +++ b/core/views/caves.py @@ -389,8 +389,7 @@ def edit_cave(request, path="", slug=None): else: if slug is not None: # re-read cave data from file. - filename = str(cave.slug() +".html") - read_cave(filename, cave=cave) + read_cave(cave.filename, cave=cave) form = CaveForm(instance=cave, initial={'cave_slug': cave.slug()}) ceFormSet = CaveAndEntranceFormSet(queryset=cave.caveandentrance_set.all())