Fix deadline was set to nil when update
This commit is contained in:
parent
efaed060d9
commit
bcc13a47e6
|
@ -301,7 +301,7 @@ class Panel::Announcement::BackEnd::BulletinsController < OrbitBackendController
|
||||||
protected
|
protected
|
||||||
|
|
||||||
def delete_out_invalid_date_from_params
|
def delete_out_invalid_date_from_params
|
||||||
if(params[:bulletin]["deadline(1i)"].blank? or params[:bulletin]["deadline(2i)"].blank? or params[:bulletin]["deadline(3i)"].blank?)
|
if((params[:bulletin]["deadline(1i)"] && params[:bulletin]["deadline(1i)"].blank?) or (params[:bulletin]["deadline(2i)"] && params[:bulletin]["deadline(2i)"].blank?) or (params[:bulletin]["deadline(3i)"] && params[:bulletin]["deadline(3i)"].blank?))
|
||||||
params[:bulletin].delete("deadline(1i)")
|
params[:bulletin].delete("deadline(1i)")
|
||||||
params[:bulletin].delete("deadline(2i)")
|
params[:bulletin].delete("deadline(2i)")
|
||||||
params[:bulletin].delete("deadline(3i)")
|
params[:bulletin].delete("deadline(3i)")
|
||||||
|
|
|
@ -338,7 +338,7 @@ class Panel::News::BackEnd::NewsBulletinsController < OrbitBackendController
|
||||||
protected
|
protected
|
||||||
|
|
||||||
def delete_out_invalid_date_from_params
|
def delete_out_invalid_date_from_params
|
||||||
if(params[:news_bulletin]["deadline(1i)"].blank? or params[:news_bulletin]["deadline(2i)"].blank? or params[:news_bulletin]["deadline(3i)"].blank?)
|
if((params[:news_bulletin]["deadline(1i)"] && params[:news_bulletin]["deadline(1i)"].blank?) or (params[:news_bulletin]["deadline(2i)"] && params[:news_bulletin]["deadline(2i)"].blank?) or (params[:news_bulletin]["deadline(3i)"] && params[:news_bulletin]["deadline(3i)"].blank?))
|
||||||
params[:news_bulletin].delete("deadline(1i)")
|
params[:news_bulletin].delete("deadline(1i)")
|
||||||
params[:news_bulletin].delete("deadline(2i)")
|
params[:news_bulletin].delete("deadline(2i)")
|
||||||
params[:news_bulletin].delete("deadline(3i)")
|
params[:news_bulletin].delete("deadline(3i)")
|
||||||
|
|
Reference in New Issue