Merge pull request #295 from abf/rosa-build:fix-platform-arch-settings
Fix: platform-arch-settings
This commit is contained in:
commit
7196b2e201
|
@ -12,7 +12,12 @@ module PlatformsHelper
|
|||
|
||||
def platform_arch_settings(platform)
|
||||
settings = platform.platform_arch_settings
|
||||
settings |= Arch.where('id not in (?)', settings.map(&:arch_id)).map do |arch|
|
||||
arches = if arch_ids = settings.map(&:arch_id) && arch_ids.present?
|
||||
Arch.where('id not in (?)', arch_ids)
|
||||
else
|
||||
Arch.all
|
||||
end
|
||||
settings |= arches.map do |arch|
|
||||
platform.platform_arch_settings.build(
|
||||
:arch_id => arch.id,
|
||||
:time_living => PlatformArchSetting::DEFAULT_TIME_LIVING
|
||||
|
|
Loading…
Reference in New Issue