Skip to content

Commit

Permalink
fixed edit static page post created new instances
Browse files Browse the repository at this point in the history
  • Loading branch information
mikemaddem committed Aug 4, 2021
1 parent 6d7a4a3 commit 057bf3e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion staff/views/staff.py
Expand Up @@ -237,7 +237,7 @@ def edit_static_page(request, slug):
else:
page = StaticPage.objects.get(slug=slug)
if request.method == 'POST':
form = StaticPageForm(request.POST)
form = StaticPageForm(request.POST, instance=page)
if form.is_valid():
form.save()
messages.success(request, "Successfully updated static page")
Expand Down

0 comments on commit 057bf3e

Please sign in to comment.