From 943ba3e34fed6d82f79a737e043c408746ab392a Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Wed, 6 Feb 2008 19:05:42 +0000 Subject: [PATCH] Trac importer: handle nil usernames. git-svn-id: http://redmine.rubyforge.org/svn/trunk@1125 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- lib/tasks/migrate_from_trac.rake | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/tasks/migrate_from_trac.rake b/lib/tasks/migrate_from_trac.rake index 2eca13dc3..5c006bc82 100644 --- a/lib/tasks/migrate_from_trac.rake +++ b/lib/tasks/migrate_from_trac.rake @@ -157,6 +157,8 @@ namespace :redmine do end def self.find_or_create_user(username, project_member = false) + return User.anonymous if username.blank? + u = User.find_by_login(username) if !u # Create a new user if not found