Commit 6dfa800b5931b9055a0f387f2f086aa39dad19c8
1 parent
a7c014ed
Exists in
master
and in
29 other branches
[Mezuro] Project name preexisting on Kalibro verification fixed
Showing
1 changed file
with
3 additions
and
4 deletions
Show diff stats
plugins/mezuro/lib/mezuro_plugin/project_content.rb
@@ -50,12 +50,11 @@ class MezuroPlugin::ProjectContent < Article | @@ -50,12 +50,11 @@ class MezuroPlugin::ProjectContent < Article | ||
50 | 50 | ||
51 | private | 51 | private |
52 | 52 | ||
53 | - #FIXME | ||
54 | def validate_kalibro_project_name | 53 | def validate_kalibro_project_name |
55 | - begin | ||
56 | - Kalibro::Client::ProjectClient.project(name) | 54 | + existing = Kalibro::Client::ProjectClient.new.project_names |
55 | + | ||
56 | + if existing.include?(name) | ||
57 | errors.add_to_base("Project name already exists in Kalibro") | 57 | errors.add_to_base("Project name already exists in Kalibro") |
58 | - rescue | ||
59 | end | 58 | end |
60 | end | 59 | end |
61 | 60 |