Commit 7c3c836d authored by 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.
parent cba6d797
...@@ -62,6 +62,6 @@ module VisibilityLevelHelper ...@@ -62,6 +62,6 @@ module VisibilityLevelHelper
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
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment