From d4bc274d113fb3463db98b88d52cf65e0fa12f0e Mon Sep 17 00:00:00 2001 From: robcolbert Date: Mon, 8 Jul 2019 06:16:14 -0400 Subject: [PATCH] add check to make sure a change is submitted for display name --- app/controllers/settings/profiles_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/settings/profiles_controller.rb b/app/controllers/settings/profiles_controller.rb index 69220efd..32714955 100644 --- a/app/controllers/settings/profiles_controller.rb +++ b/app/controllers/settings/profiles_controller.rb @@ -17,7 +17,7 @@ class Settings::ProfilesController < Settings::BaseController def update # if verified and display_name is different, return flash error and redirect back - if @account.is_verified && @account.display_name != params[:account][:display_name] + if @account.is_verified && params[:account][:display_name] && @account.display_name != params[:account][:display_name] flash[:alert] = 'Unable to change Display name for verified account' redirect_to settings_profile_path else