BigW Consortium Gitlab

Commit 9007a293 by George Andrinopoulos

Fix todos API endpoint application error

parent f15340e0
...@@ -397,8 +397,12 @@ module API ...@@ -397,8 +397,12 @@ module API
expose :target_type expose :target_type
expose :target do |todo, options| expose :target do |todo, 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) Entities.const_get(todo.target_type).represent(todo.target, options)
end end
end
expose :target_url do |todo, options| expose :target_url do |todo, options|
target_type = todo.target_type.underscore target_type = todo.target_type.underscore
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment