summaryrefslogtreecommitdiff
path: root/app/models
diff options
context:
space:
mode:
Diffstat (limited to 'app/models')
-rw-r--r--app/models/identity.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/identity.rb b/app/models/identity.rb
index 0d25bae..a8eaba6 100644
--- a/app/models/identity.rb
+++ b/app/models/identity.rb
@@ -130,7 +130,7 @@ class Identity < CouchRest::Model::Base
def alias_available
same_address = Identity.by_address.key(address)
- if same_address.detect { |other| other.user != self.user }
+ if same_address.detect { |other| other != self && other.user != self.user }
errors.add :address, :taken
end
end