Do not throw RecordNotUpdated error
This commit is contained in:
parent
53caf94af9
commit
d7a978642e
@ -153,11 +153,7 @@ impl Updater {
|
|||||||
)
|
)
|
||||||
.all(db)
|
.all(db)
|
||||||
.await?;
|
.await?;
|
||||||
// If we got an empty Vec then we are updating a row that does not exist.
|
Ok(models)
|
||||||
match models.is_empty() {
|
|
||||||
true => Err(DbErr::RecordNotUpdated),
|
|
||||||
false => Ok(models),
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
false => unimplemented!("Database backend doesn't support RETURNING"),
|
false => unimplemented!("Database backend doesn't support RETURNING"),
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
pub mod common;
|
pub mod common;
|
||||||
|
|
||||||
pub use common::{bakery_chain::*, setup::*, TestContext};
|
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};
|
pub use sea_query::{Expr, Query};
|
||||||
use serde_json::json;
|
use serde_json::json;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user