diff options
Diffstat (limited to 'app/services/todo_service.rb')
-rw-r--r-- | app/services/todo_service.rb | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/app/services/todo_service.rb b/app/services/todo_service.rb index 6ae394072c6..06352d36215 100644 --- a/app/services/todo_service.rb +++ b/app/services/todo_service.rb @@ -329,11 +329,12 @@ class TodoService commit_id: nil } - if target.is_a?(Commit) + case target + when Commit attributes.merge!(target_id: nil, commit_id: target.id) - elsif target.is_a?(Issue) + when Issue attributes[:issue_type] = target.issue_type - elsif target.is_a?(Discussion) + when Discussion attributes.merge!(target_type: nil, target_id: nil, discussion: target) end |