Commit 21842cf9 authored by Robert Speicher's avatar Robert Speicher

Merge branch 'mark-done-todo-id' into 'master'

Correctly return todo ID after creating todo

See merge request !4941
parents 121c5c83 d17ab054
......@@ -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
......
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