From: Jean-Philippe Lang Date: Wed, 6 Feb 2008 19:05:42 +0000 (+0000) Subject: Trac importer: handle nil usernames. X-Git-Tag: 0.7.0-RC1~161 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=943ba3e34fed6d82f79a737e043c408746ab392a;p=redmine.git Trac importer: handle nil usernames. git-svn-id: http://redmine.rubyforge.org/svn/trunk@1125 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- 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