diff --git a/upub/core/src/context.rs b/upub/core/src/context.rs index bf15d819..4121e17f 100644 --- a/upub/core/src/context.rs +++ b/upub/core/src/context.rs @@ -1,8 +1,8 @@ use std::{collections::BTreeSet, sync::Arc}; -use sea_orm::{ColumnTrait, DatabaseConnection, DbErr, EntityTrait, QueryFilter, QuerySelect, SelectColumns}; +use sea_orm::{DatabaseConnection, DbErr}; -use crate::{config::Config, ext::AnyQuery, model}; +use crate::{config::Config, model}; use uriproxy::UriClass; #[derive(Clone)] diff --git a/upub/core/src/selector.rs b/upub/core/src/selector.rs index 0d0c2d6b..f5434406 100644 --- a/upub/core/src/selector.rs +++ b/upub/core/src/selector.rs @@ -21,6 +21,7 @@ impl Query { .add(model::object::Column::Id.is_not_null()) ) .order_by(model::addressing::Column::Published, Order::Desc) + .order_by(model::activity::Column::Internal, Order::Desc) .select_only(); for col in model::activity::Column::iter() { @@ -52,6 +53,7 @@ impl Query { ]) .join(sea_orm::JoinType::InnerJoin, model::addressing::Relation::Objects.def()) .order_by(model::addressing::Column::Published, Order::Desc) + .order_by(model::object::Column::Internal, Order::Desc) .select_only(); for col in model::object::Column::iter() {