Merge branch 'todo-update-order' into 'master'
Remove unnecessary ORDER BY clause when updating todos See merge request !10399
This commit is contained in:
commit
fee8dcde19
2 changed files with 5 additions and 1 deletions
|
@ -204,7 +204,7 @@ class TodoService
|
|||
# Only update those that are not really on that state
|
||||
todos = todos.where.not(state: state)
|
||||
todos_ids = todos.pluck(:id)
|
||||
todos.update_all(state: state)
|
||||
todos.unscope(:order).update_all(state: state)
|
||||
current_user.update_todos_count_cache
|
||||
todos_ids
|
||||
end
|
||||
|
|
4
changelogs/unreleased/todo-update-order.yml
Normal file
4
changelogs/unreleased/todo-update-order.yml
Normal file
|
@ -0,0 +1,4 @@
|
|||
---
|
||||
title: Remove unnecessary ORDER BY clause when updating todos
|
||||
merge_request:
|
||||
author: mhasbini
|
Loading…
Reference in a new issue