fix: oops keep mixing up activity and object...

This commit is contained in:
əlemi 2024-06-08 04:54:48 +02:00
parent 1852f78a2f
commit 9e5740d6e4
Signed by: alemi
GPG key ID: A4895B84D311642C

View file

@ -47,7 +47,7 @@ impl Query {
pub fn objects(my_id: Option<i64>) -> Select<model::addressing::Entity> {
let mut select = model::addressing::Entity::find()
.distinct_on([
(model::activity::Entity, model::activity::Column::Internal).into_column_ref(),
(model::object::Entity, model::object::Column::Internal).into_column_ref(),
(model::addressing::Entity, model::addressing::Column::Published).into_column_ref(),
])
.join(sea_orm::JoinType::InnerJoin, model::addressing::Relation::Objects.def())