Do not throw RecordNotUpdated error
This commit is contained in:
parent
53caf94af9
commit
d7a978642e
@ -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"),
|
||||
}
|
||||
|
@ -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;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user