forked from Gitlink/forgeplus
fixed owner
This commit is contained in:
parent
badd950ff9
commit
38862b9843
|
@ -110,7 +110,7 @@ class RepositoriesController < ApplicationController
|
||||||
end
|
end
|
||||||
|
|
||||||
def commits_slice
|
def commits_slice
|
||||||
@hash_commit = Gitea::Repository::Commits::ListSliceService.call(@owner.login, @project.identifier,
|
@hash_commit = Gitea::Repository::Commits::ListSliceService.call(@owner&.login, @project.identifier,
|
||||||
sha: params[:sha], page: params[:page], limit: params[:limit], token: current_user&.gitea_token)
|
sha: params[:sha], page: params[:page], limit: params[:limit], token: current_user&.gitea_token)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -365,7 +365,6 @@ class Project < ApplicationRecord
|
||||||
logger.info "########namespace_path: #{namespace_path} ########identifier: #{identifier} "
|
logger.info "########namespace_path: #{namespace_path} ########identifier: #{identifier} "
|
||||||
|
|
||||||
user = Owner.find_by_login namespace_path
|
user = Owner.find_by_login namespace_path
|
||||||
user = Owner.new(login: namespace_path) if user.nil?
|
|
||||||
project = user&.projects&.find_by(identifier: identifier) || Project.find_by(identifier: "#{namespace_path}/#{identifier}")
|
project = user&.projects&.find_by(identifier: identifier) || Project.find_by(identifier: "#{namespace_path}/#{identifier}")
|
||||||
return nil if project.blank?
|
return nil if project.blank?
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue