fix: devops organization bug

This commit is contained in:
2022-02-10 14:08:14 +08:00
parent 26f87fba16
commit 298abdd1b1
3 changed files with 5 additions and 5 deletions
+3 -3
View File
@@ -5,10 +5,10 @@ class Ci::Repo < Ci::RemoteBase
has_one :perm, foreign_key: :perm_repo_uid
has_many :builds, foreign_key: :build_repo_id, dependent: :destroy
def self.find_with_namespace(namespace_path, identifier)
def self.find_with_namespace(namespace_path, identifier, user_login)
logger.info "########namespace_path: #{namespace_path} ########identifier: #{identifier} "
user = Ci::User.find_by_user_login namespace_path
user_login = user_login || namespace_path
user = Ci::User.find_by_user_login user_login
repo = Ci::Repo.where(repo_namespace: namespace_path, repo_name: identifier).first
[user, repo]