0
0
mirror of https://github.com/wagtail/wagtail.git synced 2024-11-25 13:10:14 +01:00

Fixes first preview.

This commit is contained in:
Bertrand Bordage 2017-11-22 17:00:21 +01:00
parent c04024580a
commit 3922bcf258

View File

@ -589,7 +589,8 @@ class PreviewOnEdit(View):
def get(self, request, *args, **kwargs):
page = self.get_page()
post_data, timestamp = self.request.session.get(self.session_key)
post_data, timestamp = self.request.session.get(self.session_key,
(None, None))
if not isinstance(post_data, str):
post_data = ''
form = self.get_form(page, QueryDict(post_data))