summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2008-02-06 19:05:42 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2008-02-06 19:05:42 +0000
commit943ba3e34fed6d82f79a737e043c408746ab392a (patch)
tree62167eff896e14bf4f57a8c14e8034cdb67ed5b9 /lib
parent68d3305ae22aaabc23200ede18809cb96d912a54 (diff)
downloadredmine-943ba3e34fed6d82f79a737e043c408746ab392a.tar.gz
redmine-943ba3e34fed6d82f79a737e043c408746ab392a.zip
Trac importer: handle nil usernames.
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1125 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib')
-rw-r--r--lib/tasks/migrate_from_trac.rake2
1 files changed, 2 insertions, 0 deletions
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