From 89c6a923dc75b25d2711f19a5cf63b00886b2aa9 Mon Sep 17 00:00:00 2001 From: alemi Date: Sun, 9 Jun 2024 19:46:51 +0200 Subject: [PATCH] fix: accept update modifies non null column --- upub/core/src/traits/process.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/upub/core/src/traits/process.rs b/upub/core/src/traits/process.rs index 60977fee..ea4388ec 100644 --- a/upub/core/src/traits/process.rs +++ b/upub/core/src/traits/process.rs @@ -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(