From 92382ca4733f9b9e161d46aef43c69b4bd76a392 Mon Sep 17 00:00:00 2001 From: Maikel Linke Date: Tue, 13 Jan 2026 11:02:49 +1100 Subject: [PATCH] Remove outdated warning We only create a user when seeding the database and we check that there's no user already. We don't have a use case for adding an admin user to a database with user data. It also referred to a spree task that doesn't exist in our code base. --- db/default/users.rb | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/db/default/users.rb b/db/default/users.rb index 945f719c5c..2a64eac41d 100644 --- a/db/default/users.rb +++ b/db/default/users.rb @@ -3,18 +3,6 @@ def create_admin_user attributes = read_user_attributes - if Spree::User.find_by(email: attributes[:email]) - printf <<~TEXT - - WARNING: There is already a user with the email: #{email}, - so no account changes were made. If you wish to create an additional admin - user, please run rake spree_auth:admin:create again with a different email. - - TEXT - - return - end - admin = Spree::User.new(attributes) admin.skip_confirmation! admin.skip_confirmation_notification! @@ -49,4 +37,4 @@ def read_user_attributes } end -create_admin_user if Spree::User.admin.empty? +create_admin_user if Spree::User.none?