commit ed8091a994a97747b8a0b13913c5a30ddd1d4c82
parent 56cad93e0fecd2d42a321e761c2124d2c64d0847
Author: Stefan Melmuk <509385+stefan0xC@users.noreply.github.com>
Date: Wed, 22 Mar 2023 21:45:57 +0100
don't use `assert()` in production code
Co-authored-by: Daniel GarcĂa <dani-garcia@users.noreply.github.com>
Diffstat:
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git 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;