diff --git a/ruby_event_store/lib/ruby_event_store/mappers/transformation/encryption.rb b/ruby_event_store/lib/ruby_event_store/mappers/transformation/encryption.rb index 03b8162f0d..ef51f77604 100644 --- a/ruby_event_store/lib/ruby_event_store/mappers/transformation/encryption.rb +++ b/ruby_event_store/lib/ruby_event_store/mappers/transformation/encryption.rb @@ -98,7 +98,7 @@ def encrypt_attribute(data, attribute, meta) case meta when Leaf value = data.fetch(attribute) - return unless value + return if value.nil? encryption_key = key_repository.key_of(meta.fetch(:identifier)) encryption_key.encrypt(serializer.dump(value), meta.fetch(:iv))