diff options
author | Robert Speicher <robert@gitlab.com> | 2016-04-01 19:32:00 +0300 |
---|---|---|
committer | Robert Speicher <robert@gitlab.com> | 2016-04-01 19:32:00 +0300 |
commit | 64106865dfc0c8af169b01c702099c381fc17f23 (patch) | |
tree | bff27b5f3a510778abf35c4807ef56b0d9c29ffa /lib | |
parent | a4f55888df246a36f9aac0b433f64978d540d188 (diff) | |
parent | c2d5cc91c00654e1a0a0d01271022059c803d674 (diff) |
Merge branch 'fix/fogbugz-import' into 'master'
spec and fix for fogbugz lonely user problem
Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/14766
I encountered this issue while manually testing all import types for
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/3066
This is really due to a horrible API
```
{ 'people' => { 'person' => array_of_people_or_single_person_as_hash } }
```
See merge request !3457
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/fogbugz_import/client.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/gitlab/fogbugz_import/client.rb b/lib/gitlab/fogbugz_import/client.rb index 431d50882fd..2152182b37f 100644 --- a/lib/gitlab/fogbugz_import/client.rb +++ b/lib/gitlab/fogbugz_import/client.rb @@ -26,7 +26,7 @@ module Gitlab def user_map users = {} res = @api.command(:listPeople) - res['people']['person'].each do |user| + [res['people']['person']].flatten.each do |user| users[user['ixPerson']] = { name: user['sFullName'], email: user['sEmail'] } end users |