From c1673882190a8b01fb20f28d975b197e5307e7f8 Mon Sep 17 00:00:00 2001 From: bohung Date: Sun, 17 May 2020 21:24:56 +0800 Subject: [PATCH] Fix bug --- app/controllers/announcements_controller.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/controllers/announcements_controller.rb b/app/controllers/announcements_controller.rb index 90db09e..cd2781f 100644 --- a/app/controllers/announcements_controller.rb +++ b/app/controllers/announcements_controller.rb @@ -190,6 +190,7 @@ class AnnouncementsController < ApplicationController else announcement = Bulletin.can_display_and_sorted.where(:uid => uid).first end + announcement = Bulletin.where(:uid => uid).first if announcement.nil? url_to_edit = OrbitHelper.user_can_edit?(announcement) ? "/admin/announcements/#{announcement.id.to_s}/edit" : "" access_level = OrbitHelper.user_access_level?