From ed8091a994a97747b8a0b13913c5a30ddd1d4c82 Mon Sep 17 00:00:00 2001 From: Stefan Melmuk <509385+stefan0xC@users.noreply.github.com> Date: Wed, 22 Mar 2023 21:45:57 +0100 Subject: [PATCH] don't use `assert()` in production code MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Daniel GarcĂ­a --- src/api/core/organizations.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/api/core/organizations.rs b/src/api/core/organizations.rs index 556da3dd..cac71615 100644 --- a/src/api/core/organizations.rs +++ b/src/api/core/organizations.rs @@ -610,7 +610,9 @@ async fn bulk_delete_organization_collections( mut conn: DbConn, ) -> EmptyResult { let data: BulkCollectionIds = data.into_inner().data; - assert!(org_id == data.OrganizationId); + if org_id != data.OrganizationId { + err!("OrganizationId mismatch"); + } let collections = data.Ids;