diff options
author | George Andrinopoulos <geoandri@gmail.com> | 2017-02-17 15:43:37 +0200 |
---|---|---|
committer | George Andrinopoulos <geoandri@gmail.com> | 2017-02-17 15:43:37 +0200 |
commit | 9007a293a4af1872aa3ce2f0d613510f7839928f (patch) | |
tree | bc5d39f86b25e631779c8e3fffb617c091c24f1f /lib | |
parent | f15340e044391945a5bee6f135a453ff7e05b270 (diff) | |
download | gitlab-ce-9007a293a4af1872aa3ce2f0d613510f7839928f.tar.gz |
Fix todos API endpoint application error
Diffstat (limited to 'lib')
-rw-r--r-- | lib/api/entities.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/api/entities.rb b/lib/api/entities.rb index 232f231ddd2..4484ea92d48 100644 --- a/lib/api/entities.rb +++ b/lib/api/entities.rb @@ -397,7 +397,11 @@ module API expose :target_type expose :target do |todo, options| - Entities.const_get(todo.target_type).represent(todo.target, options) + if todo.target_type == 'Commit' + Entities.const_get('RepoCommit').represent(todo.target, options) + else + Entities.const_get(todo.target_type).represent(todo.target, options) + end end expose :target_url do |todo, options| |