diff --git a/src/executor/update.rs b/src/executor/update.rs index d2d772ec..aef8b4d5 100644 --- a/src/executor/update.rs +++ b/src/executor/update.rs @@ -153,11 +153,7 @@ impl Updater { ) .all(db) .await?; - // If we got an empty Vec then we are updating a row that does not exist. - match models.is_empty() { - true => Err(DbErr::RecordNotUpdated), - false => Ok(models), - } + Ok(models) } false => unimplemented!("Database backend doesn't support RETURNING"), } diff --git a/tests/returning_tests.rs b/tests/returning_tests.rs index fe0ca458..bcdcc38d 100644 --- a/tests/returning_tests.rs +++ b/tests/returning_tests.rs @@ -1,7 +1,7 @@ pub mod common; pub use common::{bakery_chain::*, setup::*, TestContext}; -pub use sea_orm::{entity::prelude::*, *}; +use sea_orm::{entity::prelude::*, IntoActiveModel}; pub use sea_query::{Expr, Query}; use serde_json::json;