fix: not found user return 404

This commit is contained in:
yystopf 2022-05-18 11:37:23 +08:00
parent ca3c564529
commit e237fd46f7
1 changed files with 1 additions and 3 deletions

View File

@ -11,10 +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?
return render_not_found unless @owner.present?
# 组织
if @owner.is_a?(Organization)
return render_forbidden("没有查看组织的权限") if org_limited_condition || org_privacy_condition