diff --git a/app/controllers/admin/users_controller.rb b/app/controllers/admin/users_controller.rb index 910f8aa041a..a378f907997 100644 --- a/app/controllers/admin/users_controller.rb +++ b/app/controllers/admin/users_controller.rb @@ -3,7 +3,7 @@ class Admin::UsersController < Admin::AdminController def index # Sort order if params[:query] == "active" - @users = User.order("COALESCE(last_seen_at, '1970-01-01') DESC, username") + @users = User.order("COALESCE(last_seen_at, to_date('1970-01-01', 'YYYY-MM-DD')) DESC, username") else @users = User.order("created_at DESC, username") end