From d5a83a5c7c5605c39b13405db7818e6f1376cc6a Mon Sep 17 00:00:00 2001 From: alemi Date: Mon, 15 Apr 2024 22:10:49 +0200 Subject: [PATCH] fix: attempt to select only one addressing --- src/model/addressing.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/model/addressing.rs b/src/model/addressing.rs index 7c75ebd6..5c517c7c 100644 --- a/src/model/addressing.rs +++ b/src/model/addressing.rs @@ -85,6 +85,7 @@ impl FromQueryResult for EmbeddedActivity { impl Entity { pub fn find_activities() -> Select { let mut select = Entity::find() + .distinct() .select_only() .join(sea_orm::JoinType::InnerJoin, Relation::Activity.def()) // INNERJOIN: filter out addressings for which we don't have an activity anymore @@ -104,6 +105,7 @@ impl Entity { pub fn find_objects() -> Select { let mut select = Entity::find() + .distinct() .select_only() .join(sea_orm::JoinType::InnerJoin, Relation::Object.def()); // INNERJOIN: filter out addressings for which we don't have an activity anymore