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