mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-02 19:30:48 +08:00
操作记录记录显示调整,不存在用户仅显示id
This commit is contained in:
@@ -40,10 +40,11 @@ class UserAction < ApplicationRecord
|
||||
end
|
||||
|
||||
def opt_user_name
|
||||
if user&.id == user_id
|
||||
"--"
|
||||
user = User.find_by(id: self.user_id)
|
||||
if user.present?
|
||||
user&.login
|
||||
else
|
||||
User.find_by(id: self.user_id)&.login
|
||||
"不存用户:#{action_id}"
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user