backend: update set id unchanged

This commit is contained in:
Sphereso 2024-07-11 21:04:41 +02:00
parent b3c3c9dd49
commit 1dfe2f8ed6

View file

@ -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))
}