diff options
author | Azul <azul@leap.se> | 2014-05-28 11:44:12 +0200 |
---|---|---|
committer | Azul <azul@leap.se> | 2014-05-28 11:44:12 +0200 |
commit | 682b4060cb86c52ffda638f4f9a837f107540610 (patch) | |
tree | 5c5158707825d6461efa8404dfed73b237833c8b /app/models/pgp_key.rb | |
parent | 5c8ab9298cc4705de508a3f3f9d9d6370a01ff5e (diff) |
ensure identity is cleared on user.reload - fixes test
Diffstat (limited to 'app/models/pgp_key.rb')
-rw-r--r-- | app/models/pgp_key.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/models/pgp_key.rb b/app/models/pgp_key.rb index 66f8660..3384f4c 100644 --- a/app/models/pgp_key.rb +++ b/app/models/pgp_key.rb @@ -25,9 +25,10 @@ class PgpKey # allow comparison with plain keyblock strings. def ==(other) + return false if (self.present? != other.present?) self.equal?(other) or # relax the comparison on line ends. - self.to_s.tr_s("\n\r", '') == other.tr_s("\r\n", '') + self.to_s.tr_s("\n\r", '') == other.tr_s("\n\r", '') end protected |