fix not found error
This commit is contained in:
parent
9a6dbc4875
commit
4fbb66d19d
|
@ -114,7 +114,7 @@ class AnnouncementsController < ApplicationController
|
||||||
tags = OrbitHelper.widget_tags || []
|
tags = OrbitHelper.widget_tags || []
|
||||||
cats = OrbitHelper.widget_categories || []
|
cats = OrbitHelper.widget_categories || []
|
||||||
subpart = OrbitHelper.get_current_widget
|
subpart = OrbitHelper.get_current_widget
|
||||||
anns_cache = AnnsCache.where(parent_id: subpart.id,locale: I18n.locale.to_s)
|
anns_cache = AnnsCache.where(parent_id: subpart.id.to_s,locale: I18n.locale.to_s)
|
||||||
widget_data_count = OrbitHelper.widget_data_count
|
widget_data_count = OrbitHelper.widget_data_count
|
||||||
set_image_version_for_widget
|
set_image_version_for_widget
|
||||||
if !(defined? SiteFeed).nil? || anns_cache.count != 1 || is_random
|
if !(defined? SiteFeed).nil? || anns_cache.count != 1 || is_random
|
||||||
|
@ -129,7 +129,7 @@ class AnnouncementsController < ApplicationController
|
||||||
if anns_cache.count > 1
|
if anns_cache.count > 1
|
||||||
anns_cache.destroy
|
anns_cache.destroy
|
||||||
end
|
end
|
||||||
AnnsCache.create(parent_id: subpart.id,locale: I18n.locale.to_s,filter_result: sorted_anns.pluck(:id))
|
AnnsCache.create(parent_id: subpart.id.to_s,locale: I18n.locale.to_s,filter_result: sorted_anns.pluck(:id))
|
||||||
else
|
else
|
||||||
sorted_anns = sorted_anns.sample(widget_data_count)
|
sorted_anns = sorted_anns.sample(widget_data_count)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue