Browse Source

Merge branch 'standalone_develop' into pre_trustie_server

tags/v4.0.0^2
xiaoxiaoqiong 4 years ago
parent
commit
2116af759d
2 changed files with 1 additions and 2 deletions
  1. +1
    -1
      app/controllers/repositories_controller.rb
  2. +0
    -1
      app/models/project.rb

+ 1
- 1
app/controllers/repositories_controller.rb View File

@@ -110,7 +110,7 @@ class RepositoriesController < ApplicationController
end

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)
end



+ 0
- 1
app/models/project.rb View File

@@ -362,7 +362,6 @@ class Project < ApplicationRecord
logger.info "########namespace_path: #{namespace_path} ########identifier: #{identifier} "
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}")
return nil if project.blank?


Loading…
Cancel
Save