]> source.dussan.org Git - redmine.git/commitdiff
Trac importer: handle nil usernames.
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Wed, 6 Feb 2008 19:05:42 +0000 (19:05 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Wed, 6 Feb 2008 19:05:42 +0000 (19:05 +0000)
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1125 e93f8b46-1217-0410-a6f0-8f06a7374b81

lib/tasks/migrate_from_trac.rake

index 2eca13dc38bdadb054e09a5648b9f41dac3a0339..5c006bc82a8360d493f1dc0de2c5765e2d9e4513 100644 (file)
@@ -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