fix: update task should have unchanged not set

This commit is contained in:
əlemi 2024-06-13 17:10:43 +02:00
parent 1dcd9e6e13
commit 37fa1df9ab
Signed by: alemi
GPG key ID: A4895B84D311642C

View file

@ -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;