From 1dfe2f8ed641d046ddacc505088becaa3b71b2a0 Mon Sep 17 00:00:00 2001 From: Sphereso Date: Thu, 11 Jul 2024 21:04:41 +0200 Subject: [PATCH] backend: update set id unchanged --- crates/backend/src/controller/license.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/backend/src/controller/license.rs b/crates/backend/src/controller/license.rs index 31b1d33..36c9782 100644 --- a/crates/backend/src/controller/license.rs +++ b/crates/backend/src/controller/license.rs @@ -75,7 +75,7 @@ impl LicenseController { let db = &state.db; let mut license = license.into_inner().into_active_model(); let id = path.into_inner(); - license.id = ActiveValue::Set(id); + license.id = ActiveValue::Unchanged(id); let res = license.update(db).await.map_err(ErrorInternalServerError)?; Ok(web::Json(res)) }