From 37fa1df9ab4e7cc2877e844a85559314fd16e7f1 Mon Sep 17 00:00:00 2001 From: alemi Date: Thu, 13 Jun 2024 17:10:43 +0200 Subject: [PATCH] fix: update task should have unchanged not set --- upub/cli/src/update.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/upub/cli/src/update.rs b/upub/cli/src/update.rs index adf30e40..d0225860 100644 --- a/upub/cli/src/update.rs +++ b/upub/cli/src/update.rs @@ -1,5 +1,5 @@ use futures::TryStreamExt; -use sea_orm::{ActiveValue::Set, ColumnTrait, EntityTrait, QueryFilter}; +use sea_orm::{ActiveValue::{Unchanged, Set}, ColumnTrait, EntityTrait, QueryFilter}; use upub::traits::Fetcher; pub async fn update_users(ctx: upub::Context, days: i64) -> Result<(), sea_orm::DbErr> { @@ -20,7 +20,7 @@ pub async fn update_users(ctx: upub::Context, days: i64) -> Result<(), sea_orm:: Ok(Err(e)) => tracing::warn!("could not update user {}: {e}", user.id), Ok(Ok(doc)) => match upub::AP::actor_q(&doc) { Ok(mut u) => { - u.internal = Set(user.internal); + u.internal = Unchanged(user.internal); u.updated = Set(chrono::Utc::now()); insertions.push((user.id, u)); count += 1;