diff --git a/app/controllers/api/users_controller.rb b/app/controllers/api/users_controller.rb index 4f23c3356b..7aceed1003 100644 --- a/app/controllers/api/users_controller.rb +++ b/app/controllers/api/users_controller.rb @@ -9,7 +9,9 @@ def show end def update - User::UpdateAvatar.(current_user, params.require(:user)[:avatar]) if params.dig(:user, :avatar).present? + if params.dig(:user, :avatar).present? # rubocop:disable Style/IfUnlessModifier: + User::UpdateAvatar.(current_user, params.require(:user)[:avatar]) + end if params.dig(:user, :seniority).present? current_user.update(