improve check if wiki page is persisted
This commit is contained in:
parent
dac548b320
commit
559ef41d32
|
@ -57,7 +57,7 @@ class Projects::WikisController < Projects::ApplicationController
|
||||||
def create
|
def create
|
||||||
@page = WikiPages::CreateService.new(@project, current_user, wiki_params).execute
|
@page = WikiPages::CreateService.new(@project, current_user, wiki_params).execute
|
||||||
|
|
||||||
if @page
|
if @page.persisted?
|
||||||
redirect_to(
|
redirect_to(
|
||||||
namespace_project_wiki_path(@project.namespace, @project, @page),
|
namespace_project_wiki_path(@project.namespace, @project, @page),
|
||||||
notice: 'Wiki was successfully updated.'
|
notice: 'Wiki was successfully updated.'
|
||||||
|
|
Loading…
Reference in New Issue