Skip to content
Snippets Groups Projects
Commit 21842cf9 authored by Robert Speicher's avatar Robert Speicher
Browse files

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

Correctly return todo ID after creating todo

See merge request !4941
parents 121c5c83 d17ab054
No related branches found
No related tags found
Loading
Pipeline #
......@@ -159,8 +159,9 @@ def mark_todo(issuable, current_user)
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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment