Commit 29c0d900360bcc032d43f395f190a066497d0b76
Committed by
Alessandro Palmeira
1 parent
29fdbbad
Exists in
master
and in
29 other branches
[Mezuro] Fixed Kalibro::Project.all when it should return just 1 project
and Kalibro::Configuration.all when it should return just 1 configuration
Showing
1 changed file
with
2 additions
and
1 deletions
Show diff stats
plugins/mezuro/lib/kalibro/configuration.rb
@@ -7,8 +7,9 @@ class Kalibro::Configuration < Kalibro::Model | @@ -7,8 +7,9 @@ class Kalibro::Configuration < Kalibro::Model | ||
7 | end | 7 | end |
8 | 8 | ||
9 | def self.all | 9 | def self.all |
10 | - response = request(:all_configurations)[:configuration].to_a | 10 | + response = request(:all_configurations)[:configuration] |
11 | response = [] if response.nil? | 11 | response = [] if response.nil? |
12 | + response = [response] if response.is_a? (Hash) | ||
12 | response.map {|configuration| new configuration} | 13 | response.map {|configuration| new configuration} |
13 | end | 14 | end |
14 | 15 |