mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-03 03:40:49 +08:00
fixed 属性判断
This commit is contained in:
@@ -877,7 +877,7 @@ class User < Owner
|
||||
|
||||
# 重写gitea_token,当用户为bot类型时,替换成管理员token
|
||||
def gitea_token
|
||||
if self.platform == "bot"
|
||||
if self.respond_to?('platform') && self.platform == "bot"
|
||||
GiteaService.gitea_config[:admin_token]
|
||||
else
|
||||
self['gitea_token']
|
||||
|
||||
Reference in New Issue
Block a user