diff --git a/app/controllers/spina/pages_controller.rb b/app/controllers/spina/pages_controller.rb index 1829a26bf..ca18c65ed 100644 --- a/app/controllers/spina/pages_controller.rb +++ b/app/controllers/spina/pages_controller.rb @@ -48,7 +48,9 @@ def spina_request_path end def current_user_can_view_page? - raise ActiveRecord::RecordNotFound unless page.live? || current_user.present? + raise ActiveRecord::RecordNotFound if page.nil? || !page.live? + + current_user.present? end def should_skip_to_first_child?