diff options
author | Phil Hughes <me@iamphill.com> | 2016-06-27 14:08:57 +0100 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2016-06-27 17:00:27 +0100 |
commit | d17ab054cfa0d44fa36a20b249b2cab7ef99e9d4 (patch) | |
tree | e02c370b347e19e7d8c9853b32cfc34d8bf2e05f /app | |
parent | 3659992cd588e10abf6eae1519a9f76231a3bc09 (diff) | |
download | gitlab-ce-d17ab054cfa0d44fa36a20b249b2cab7ef99e9d4.tar.gz |
Correctly returns todo ID after creating todomark-done-todo-id
Diffstat (limited to 'app')
-rw-r--r-- | app/services/todo_service.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/services/todo_service.rb b/app/services/todo_service.rb index 540bf54b920..239bd17a035 100644 --- a/app/services/todo_service.rb +++ b/app/services/todo_service.rb @@ -159,8 +159,9 @@ class TodoService def create_todos(users, attributes) Array(users).map do |user| next if pending_todos(user, attributes).exists? - Todo.create(attributes.merge(user_id: user.id)) + todo = Todo.create(attributes.merge(user_id: user.id)) user.update_todos_count_cache + todo end end |