fix error
This commit is contained in:
parent
8577c7e8ad
commit
bf0f561c2e
|
@ -41,6 +41,9 @@ class Admin::GalleriesController < OrbitAdminController
|
|||
end
|
||||
end
|
||||
variable = AlbumVariable.first
|
||||
if variable.nil?
|
||||
variable = AlbumVariable.new
|
||||
end
|
||||
variable.finish = false
|
||||
variable.save!
|
||||
Thread.new do
|
||||
|
@ -84,6 +87,9 @@ class Admin::GalleriesController < OrbitAdminController
|
|||
if notalive
|
||||
if !params['album_id'].to_s.empty?
|
||||
variable = AlbumVariable.first
|
||||
if variable.nil?
|
||||
variable = AlbumVariable.new
|
||||
end
|
||||
variable.finish = false
|
||||
variable.save!
|
||||
choice_ids = params['album_id'].split(',')
|
||||
|
@ -392,6 +398,9 @@ class Admin::GalleriesController < OrbitAdminController
|
|||
end
|
||||
def init_upload
|
||||
variable = AlbumVariable.first
|
||||
if variable.nil?
|
||||
variable = AlbumVariable.new
|
||||
end
|
||||
variable.count = params['all_length'].to_i
|
||||
variable.finish = false
|
||||
variable.progress_percent = '0%'
|
||||
|
|
Loading…
Reference in New Issue