From b91358a7fe83c1a3a27086495023f30c69f08b45 Mon Sep 17 00:00:00 2001 From: yystopf Date: Fri, 22 Mar 2024 08:49:26 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=EF=BC=9A=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E9=9C=80=E4=BC=A0type=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/application_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 61541d09b..0ce74c5b8 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -715,7 +715,7 @@ class ApplicationController < ActionController::Base end def find_user_with_id - @user = User.find_by_id params[:user_id] + @user = User.find_by(type: 'User', id: params[:user_id]) # render_not_found("未找到’#{params[:login]}’相关的用户") unless @user render_error("未找到相关的用户") unless @user end