mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-03 03:33:05 +08:00
FIX code review
This commit is contained in:
@@ -23,7 +23,7 @@ class BaseForm
|
||||
end
|
||||
|
||||
def check_reversed_keyword(repository_name)
|
||||
raise "项目标识已被占用." if ReversedKeyword.is_reversed(repository_name).exists?
|
||||
raise "项目标识已被占用." if ReversedKeyword.check_exists?(repository_name)
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
@@ -20,7 +20,7 @@ module Register
|
||||
def check_login
|
||||
raise("登录名格式有误") unless strip_value =~ CustomRegexp::LOGIN
|
||||
|
||||
login_exist = Owner.exists?(login: strip_value) || ReversedKeyword.exists?(identifier: strip_value)
|
||||
login_exist = Owner.exists?(login: strip_value) || ReversedKeyword.check_exists?(strip_value)
|
||||
raise('登录名已被使用') if login_exist
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user