From afb6baa44706cbed289b97f228e9babad7b1bbe3 Mon Sep 17 00:00:00 2001 From: Matt Westcott Date: Fri, 7 Aug 2020 13:46:40 +0100 Subject: [PATCH] Move save action into its own method --- wagtail/admin/views/pages/edit.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/wagtail/admin/views/pages/edit.py b/wagtail/admin/views/pages/edit.py index 10eed37589..c6d03aaf36 100644 --- a/wagtail/admin/views/pages/edit.py +++ b/wagtail/admin/views/pages/edit.py @@ -204,7 +204,10 @@ class EditView(TemplateResponseMixin, ContextMixin, HookResponseMixin, View): return self.perform_workflow_action() elif self.is_cancelling_workflow: return self.cancel_workflow_action() + else: + return self.save_action() + def save_action(self): self.page = self.form.save(commit=False) # Save revision