summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--users/app/models/user.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/users/app/models/user.rb b/users/app/models/user.rb
index 0773f28..1999a28 100644
--- a/users/app/models/user.rb
+++ b/users/app/models/user.rb
@@ -126,7 +126,7 @@ class User < CouchRest::Model::Base
##
def email_differs_from_email_aliases
- return if email_aliases.last.errors.any?
+ return if email_aliases.any? and email_aliases.last.errors.any?
if email_aliases.map(&:email).include?(email)
errors.add(:email, "may not be the same as an alias")
end