diff options
author | Yorick Peterse <yorickpeterse@gmail.com> | 2017-04-03 13:02:03 +0300 |
---|---|---|
committer | DJ Mountney <david@twkie.net> | 2017-04-03 21:53:13 +0300 |
commit | 128ff6221af6a3e8b5d2864fc8f08c279f0df72c (patch) | |
tree | a8aadd00a3d039737fe8221fe625dc5a0dcb31ad /app | |
parent | c3108c244beda4e07a546e395ab9e04014e3e5fa (diff) |
Merge branch 'todo-update-order' into 'master'
Remove unnecessary ORDER BY clause when updating todos
See merge request !10399
Diffstat (limited to 'app')
-rw-r--r-- | app/services/todo_service.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/services/todo_service.rb b/app/services/todo_service.rb index 8787a1c93a9..336f55ed161 100644 --- a/app/services/todo_service.rb +++ b/app/services/todo_service.rb @@ -202,7 +202,7 @@ class TodoService todos = current_user.todos.where(id: ids) # Only return those that are not really on that state - marked_todos = todos.where.not(state: state).update_all(state: state) + marked_todos = todos.where.not(state: state).unscope(:order).update_all(state: state) current_user.update_todos_count_cache marked_todos end |