forked from expo/troggle
When reloading a cave, do so from cave.filename, rather than inorrectly assuming the cave is named after its slug
This commit is contained in:
parent
7d140af87a
commit
43724f1cf6
@ -389,8 +389,7 @@ def edit_cave(request, path="", slug=None):
|
|||||||
else:
|
else:
|
||||||
if slug is not None:
|
if slug is not None:
|
||||||
# re-read cave data from file.
|
# re-read cave data from file.
|
||||||
filename = str(cave.slug() +".html")
|
read_cave(cave.filename, cave=cave)
|
||||||
read_cave(filename, cave=cave)
|
|
||||||
|
|
||||||
form = CaveForm(instance=cave, initial={'cave_slug': cave.slug()})
|
form = CaveForm(instance=cave, initial={'cave_slug': cave.slug()})
|
||||||
ceFormSet = CaveAndEntranceFormSet(queryset=cave.caveandentrance_set.all())
|
ceFormSet = CaveAndEntranceFormSet(queryset=cave.caveandentrance_set.all())
|
||||||
|
Loading…
Reference in New Issue
Block a user