diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2011-05-28 01:43:12 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2011-05-28 01:43:12 +0000 |
commit | eb8711a4ef23fd5bba029ad3db12c6faece9e803 (patch) | |
tree | a22829338a752c8d11423e769ae180d30e0fbaa9 /lib/tasks | |
parent | 60a3ebfa8a476d2b8c1bd4fa151c59aecd9b664c (diff) | |
download | redmine-eb8711a4ef23fd5bba029ad3db12c6faece9e803.tar.gz redmine-eb8711a4ef23fd5bba029ad3db12c6faece9e803.zip |
handle a nil user in rake redmine:email:test task.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5939 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib/tasks')
-rw-r--r-- | lib/tasks/email.rake | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/tasks/email.rake b/lib/tasks/email.rake index 5bd59f0f8..81121f839 100644 --- a/lib/tasks/email.rake +++ b/lib/tasks/email.rake @@ -172,7 +172,7 @@ END_DESC abort l(:notice_email_error, "Please include the user login to test with. Example: rake redmine:email:test[login]") if args[:login].blank?
user = User.find_by_login(args[:login])
- abort l(:notice_email_error, "User #{args[:login]} not found") unless user.logged?
+ abort l(:notice_email_error, "User #{args[:login]} not found") unless user && user.logged?
ActionMailer::Base.raise_delivery_errors = true
begin
|