commit bff54fbfdbd35fd66741f0f401963d534052e2da
parent 867c6ba056cd88617fa06dde952c8f391ac132a6
Author: BlackDex <black.dex@gmail.com>
Date: Fri, 31 Mar 2023 18:01:55 +0200
Fix sending out multiple websocket notifications
For some reason I encountered a strange bug which resulted in sending
out multiple websocket notifications for the exact same user.
Added a `distinct()` for the query to filter out multiple uuid's.
Diffstat:
1 file changed, 1 insertion(+), 0 deletions(-)
diff --git a/src/db/models/organization.rs b/src/db/models/organization.rs
@@ -715,6 +715,7 @@ impl UserOrganization {
)
)
.select(users_organizations::all_columns)
+ .distinct()
.load::<UserOrganizationDb>(conn).expect("Error loading user organizations").from_db()
}}
}