bug fix: candidate email encryption on empty email

This commit is contained in:
Mark Moser
2016-09-08 11:17:29 -05:00
parent 9f23a5d3ce
commit b74249a05f
2 changed files with 16 additions and 2 deletions

View File

@ -26,7 +26,7 @@ class CryptSerializer
raise "Attribute was supposed to be a `String`, but was instead a `#{value.class}`"
end
return value if value.nil?
return nil if value.blank?
cipher.encrypt
parts = [cipher.random_key, cipher.random_iv, cipher.update(value) + cipher.final]