Commit 1e64b8a8885176820d5a971ee942f05631fcf452
Committed by
Alessandro Palmeira
1 parent
1a8993d8
Exists in
staging
and in
42 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 | 7 | end |
| 8 | 8 | |
| 9 | 9 | def self.all |
| 10 | - response = request(:all_configurations)[:configuration].to_a | |
| 10 | + response = request(:all_configurations)[:configuration] | |
| 11 | 11 | response = [] if response.nil? |
| 12 | + response = [response] if response.is_a? (Hash) | |
| 12 | 13 | response.map {|configuration| new configuration} |
| 13 | 14 | end |
| 14 | 15 | ... | ... |