forked from Gitlink/forgeplus
Merge branch 'develop' into standalone_develop
This commit is contained in:
commit
c52cfb8615
|
@ -380,7 +380,13 @@ class Project < ApplicationRecord
|
|||
|
||||
user = Owner.find_by_login namespace_path
|
||||
user = User.new(login: namespace_path) if user.nil?
|
||||
project = user&.projects&.find_by(identifier: identifier) || Project.find_by(identifier: "#{namespace_path}/#{identifier}")
|
||||
if identifier.end_with?('.json')
|
||||
project = user&.projects&.find_by(identifier: identifier) || Project.find_by(identifier: "#{namespace_path}/#{identifier}")
|
||||
identifier = identifier.sub(/.*\K.json/, '')
|
||||
project = user&.projects&.find_by(identifier: identifier) || Project.find_by(identifier: "#{namespace_path}/#{identifier}")
|
||||
else
|
||||
project = user&.projects&.find_by(identifier: identifier) || Project.find_by(identifier: "#{namespace_path}/#{identifier}")
|
||||
end
|
||||
return nil if project.blank?
|
||||
|
||||
[project, user]
|
||||
|
|
Loading…
Reference in New Issue