From 545d12f42774248a9cb7dbc438fc37a97f95942b Mon Sep 17 00:00:00 2001 From: Bilal Date: Tue, 8 Sep 2020 17:05:36 +0300 Subject: [PATCH] fix --- app/controllers/application_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index b80b181..ef1dce4 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -31,7 +31,7 @@ class ApplicationController < ActionController::Base end def redirect_locked_accounts - if Current.user && !Current.user.admin? && Current.account.locked? + if Current.user && !Current.user.admin? && Current.account.present? && Current.account.locked? redirect_to locked_account_path end end