fix: accept update modifies non null column

This commit is contained in:
əlemi 2024-06-09 19:46:51 +02:00
parent 129724d30e
commit 89c6a923dc
Signed by: alemi
GPG key ID: A4895B84D311642C

View file

@ -189,10 +189,11 @@ pub async fn accept(ctx: &crate::Context, activity: impl apb::Activity, tx: &Dat
crate::model::relation::Entity::update_many()
.col_expr(crate::model::relation::Column::Accept, Expr::value(Some(activity_model.internal)))
.col_expr(crate::model::relation::Column::Activity, Expr::value(Some(follow_activity.internal)))
.col_expr(crate::model::relation::Column::Activity, Expr::value(follow_activity.internal))
.filter(crate::model::relation::Column::Follower.eq(follower))
.filter(crate::model::relation::Column::Following.eq(following))
.exec(tx).await?;
.exec(tx)
.await?;
crate::model::actor::Entity::update_many()
.col_expr(