diff --git a/app/controllers/announcements_controller.rb b/app/controllers/announcements_controller.rb index f28c72c..9df117a 100644 --- a/app/controllers/announcements_controller.rb +++ b/app/controllers/announcements_controller.rb @@ -114,7 +114,7 @@ class AnnouncementsController < ApplicationController tags = OrbitHelper.widget_tags || [] cats = OrbitHelper.widget_categories || [] 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 set_image_version_for_widget if !(defined? SiteFeed).nil? || anns_cache.count != 1 || is_random @@ -129,7 +129,7 @@ class AnnouncementsController < ApplicationController if anns_cache.count > 1 anns_cache.destroy 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 sorted_anns = sorted_anns.sample(widget_data_count) end