Skip to content
代码片段 群组 项目
提交 7c3c836d 编辑于 作者: Vinnie Okada's avatar Vinnie Okada
浏览文件

Handle null restricted_visibility_levels setting

Fix a 500 error when the `restricted_visibility_levels` setting is null
in the database.
上级 cba6d797
No related branches found
No related tags found
无相关合并请求
...@@ -62,6 +62,6 @@ def visibility_level_label(level) ...@@ -62,6 +62,6 @@ def visibility_level_label(level)
def restricted_visibility_levels(show_all = false) def restricted_visibility_levels(show_all = false)
return [] if current_user.is_admin? && !show_all return [] if current_user.is_admin? && !show_all
current_application_settings.restricted_visibility_levels current_application_settings.restricted_visibility_levels || []
end end
end end
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册