improve check if wiki page is persisted

This commit is contained in:
Sebastian Klier 2016-04-05 11:36:43 +08:00
parent dac548b320
commit 559ef41d32
1 changed files with 1 additions and 1 deletions

View File

@ -57,7 +57,7 @@ class Projects::WikisController < Projects::ApplicationController
def create
@page = WikiPages::CreateService.new(@project, current_user, wiki_params).execute
if @page
if @page.persisted?
redirect_to(
namespace_project_wiki_path(@project.namespace, @project, @page),
notice: 'Wiki was successfully updated.'