From 7c3c836d3b62c72d1adf5431c0fedc91d92a8907 Mon Sep 17 00:00:00 2001 From: Vinnie Okada Date: Mon, 16 Mar 2015 13:29:27 -0600 Subject: Handle null restricted_visibility_levels setting Fix a 500 error when the `restricted_visibility_levels` setting is null in the database. --- app/helpers/visibility_level_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/helpers/visibility_level_helper.rb') diff --git a/app/helpers/visibility_level_helper.rb b/app/helpers/visibility_level_helper.rb index 7c090dc594c..0d573e72a80 100644 --- a/app/helpers/visibility_level_helper.rb +++ b/app/helpers/visibility_level_helper.rb @@ -62,6 +62,6 @@ module VisibilityLevelHelper def restricted_visibility_levels(show_all = false) return [] if current_user.is_admin? && !show_all - current_application_settings.restricted_visibility_levels + current_application_settings.restricted_visibility_levels || [] end end -- cgit v1.2.3