diff --git a/src/api/core/accounts.rs b/src/api/core/accounts.rs index 7a4627f..f29ef2b 100644 --- a/src/api/core/accounts.rs +++ b/src/api/core/accounts.rs @@ -168,7 +168,7 @@ fn delete_account(data: Json, headers: Headers, conn: DbConn) -> E } // Delete ciphers and their attachments - for cipher in Cipher::find_by_user(&user.uuid, &conn) { + for cipher in Cipher::find_owned_by_user(&user.uuid, &conn) { for a in Attachment::find_by_cipher(&cipher.uuid, &conn) { a.delete(&conn); } cipher.delete(&conn);