Commit 399e6341122c864bc01887b62f80c961186b49c2
1 parent
03dba1fd
Exists in
master
and in
4 other branches
Fix GollumWiki::CouldNotCreateWikiError during tests
Showing
1 changed file
with
8 additions
and
2 deletions
Show diff stats
app/observers/project_observer.rb
... | ... | @@ -16,8 +16,14 @@ class ProjectObserver < BaseObserver |
16 | 16 | end |
17 | 17 | |
18 | 18 | if project.wiki_enabled? |
19 | - # force the creation of a wiki, | |
20 | - GollumWiki.new(project, project.owner).wiki | |
19 | + begin | |
20 | + # force the creation of a wiki, | |
21 | + GollumWiki.new(project, project.owner).wiki | |
22 | + rescue GollumWiki::CouldNotCreateWikiError => ex | |
23 | + # Prevent project observer crash | |
24 | + # if failed to create wiki | |
25 | + nil | |
26 | + end | |
21 | 27 | end |
22 | 28 | end |
23 | 29 | ... | ... |