fix error with regenerate params

This commit is contained in:
Alexander Machehin 2015-04-02 19:54:13 +05:00
parent dd9c280d09
commit e5deae8fdd
2 changed files with 2 additions and 2 deletions

View File

@ -149,7 +149,7 @@ class Platforms::RepositoriesController < Platforms::BaseController
end
def regenerate_metadata
if @repository.regenerate(params[:build_for_platform_id])
if @repository.regenerate(params[:repository].try :[], :build_for_platform_id)
flash[:notice] = t('flash.repository.regenerate_in_queue')
else
flash[:error] = t('flash.repository.regenerate_already_in_queue')

View File

@ -39,7 +39,7 @@
= t('layout.repositories.regenerate_metadata')
.col-md-2
- if @platform.personal?
= f.input :build_for_platform_id, collection: platform_options, label: false
= f.input :build_for_platform_id, collection: platform_options, label: false, include_blank: false
.col-md-2
= f.button :submit, t('layout.repositories.regenerate_metadata'), data: { confirm: t('layout.confirm') }, class: 'btn-warning'