fix error

This commit is contained in:
邱博亞 2022-03-29 15:01:18 +08:00
parent 008031e372
commit 2060c5fcf1
1 changed files with 2 additions and 2 deletions

View File

@ -9,8 +9,8 @@ class AnnouncementsController < ApplicationController
end
def manually_sort
if defined?(OrbitHelper::SharedHash) && OrbitHelper::SharedHash['announcement']
OrbitHelper::SharedHash['announcement'][:enable_manually_sort]
if defined?(OrbitHelper::SharedHash)
OrbitHelper::SharedHash['announcement'][:enable_manually_sort] rescue AnnouncementSetting.first.enable_manually_sort
else
AnnouncementSetting.first.enable_manually_sort rescue false
end