mirror of
https://github.com/wahyd4/gitlabhq.git
synced 2026-08-26 13:06:41 +10:00
Correctly returns todo ID after creating todo
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user