#455: use platform #default_branch for detecting of project version
This commit is contained in:
parent
7efe8894ff
commit
057a2688d4
|
@ -210,10 +210,10 @@ class Project < ActiveRecord::Base
|
||||||
end
|
end
|
||||||
|
|
||||||
def project_version_for(save_to_platform, build_for_platform)
|
def project_version_for(save_to_platform, build_for_platform)
|
||||||
if repo.commits("#{save_to_platform.name}").try(:first).try(:id)
|
if repo.commits("#{save_to_platform.default_branch}").try(:first).try(:id)
|
||||||
save_to_platform.name
|
save_to_platform.default_branch
|
||||||
elsif repo.commits("#{build_for_platform.name}").try(:first).try(:id)
|
elsif repo.commits("#{build_for_platform.default_branch}").try(:first).try(:id)
|
||||||
build_for_platform.name
|
build_for_platform.default_branch
|
||||||
else
|
else
|
||||||
default_branch
|
default_branch
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue