backend: update set id unchanged
This commit is contained in:
parent
b3c3c9dd49
commit
1dfe2f8ed6
1 changed files with 1 additions and 1 deletions
|
@ -75,7 +75,7 @@ impl LicenseController {
|
||||||
let db = &state.db;
|
let db = &state.db;
|
||||||
let mut license = license.into_inner().into_active_model();
|
let mut license = license.into_inner().into_active_model();
|
||||||
let id = path.into_inner();
|
let id = path.into_inner();
|
||||||
license.id = ActiveValue::Set(id);
|
license.id = ActiveValue::Unchanged(id);
|
||||||
let res = license.update(db).await.map_err(ErrorInternalServerError)?;
|
let res = license.update(db).await.map_err(ErrorInternalServerError)?;
|
||||||
Ok(web::Json(res))
|
Ok(web::Json(res))
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue