diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-10-17 10:48:35 +0400 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-10-17 10:48:35 +0400 |
commit | 399e6341122c864bc01887b62f80c961186b49c2 (patch) | |
tree | 349052d03c56e3b42c1491519e601f14570fbe1d /app/observers | |
parent | 03dba1fd4299e7a0364aa94a845aaeca60b0c286 (diff) |
Fix GollumWiki::CouldNotCreateWikiError during tests
Diffstat (limited to 'app/observers')
-rw-r--r-- | app/observers/project_observer.rb | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/app/observers/project_observer.rb b/app/observers/project_observer.rb index b82e7d9a03f..f301f306458 100644 --- a/app/observers/project_observer.rb +++ b/app/observers/project_observer.rb @@ -16,8 +16,14 @@ class ProjectObserver < BaseObserver end if project.wiki_enabled? - # force the creation of a wiki, - GollumWiki.new(project, project.owner).wiki + begin + # force the creation of a wiki, + GollumWiki.new(project, project.owner).wiki + rescue GollumWiki::CouldNotCreateWikiError => ex + # Prevent project observer crash + # if failed to create wiki + nil + end end end |