From 9bf13b78723a4177281fd8a114856d6d680aff1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Garc=C3=ADa?= Date: Tue, 15 Jan 2019 22:00:41 +0100 Subject: [PATCH] Can't return inside multipart closure --- src/api/core/ciphers.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api/core/ciphers.rs b/src/api/core/ciphers.rs index 0cfcd201..1168a0f7 100644 --- a/src/api/core/ciphers.rs +++ b/src/api/core/ciphers.rs @@ -690,7 +690,7 @@ fn post_attachment(uuid: String, data: Data, content_type: &ContentType, headers let mut attachment = Attachment::new(file_name, cipher.uuid.clone(), name, size); attachment.key = attachment_key.clone(); - attachment.save(&conn)?; + attachment.save(&conn).expect("Error saving attachment"); } _ => error!("Invalid multipart name"), }