Skip to content

Commit

Permalink
Fixed: Pagecontent template not changing when the UI option is changed (
Browse files Browse the repository at this point in the history
  • Loading branch information
Aiky30 committed Oct 29, 2020
1 parent c9cd9fb commit 6894748
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cms/admin/pageadmin.py
Expand Up @@ -1202,7 +1202,10 @@ def change_template(self, request, object_id):

if to_template not in dict(get_cms_setting('TEMPLATES')):
return HttpResponseBadRequest(force_text(_("Template not valid")))
page_content.update(template=to_template)

page_content.template = to_template
page_content.save()

return HttpResponse(force_text(_("The template was successfully changed")))

@require_POST
Expand Down

0 comments on commit 6894748

Please sign in to comment.