From ca3c56452917b968d0b302728686757e20708657 Mon Sep 17 00:00:00 2001 From: yystopf Date: Wed, 18 May 2022 11:03:39 +0800 Subject: [PATCH] fix: not found user return 404 --- app/controllers/owners_controller.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/controllers/owners_controller.rb b/app/controllers/owners_controller.rb index 067fe4da1..863f8aa3a 100644 --- a/app/controllers/owners_controller.rb +++ b/app/controllers/owners_controller.rb @@ -11,6 +11,8 @@ class OwnersController < ApplicationController end def show + return render_not_found unless @user.present? + @owner = Owner.find_by(login: params[:id]) || Owner.find_by(id: params[:id]) # return render_not_found unless @owner.present? # 组织