FIX code review

This commit is contained in:
jasder
2021-10-27 17:19:39 +08:00
parent 4676b756e8
commit cbf8f1fa67
5 changed files with 8 additions and 4 deletions

View File

@@ -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

View File

@@ -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