Skip to content

Commit

Permalink
Fix sending out multiple websocket notifications
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
BlackDex committed Mar 31, 2023
1 parent 525e6bb commit 7509d46
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/db/models/organization.rs
Original file line number Diff line number Diff line change
Expand Up @@ -715,6 +715,7 @@ impl UserOrganization {
)
)
.select(users_organizations::all_columns)
.distinct()
.load::<UserOrganizationDb>(conn).expect("Error loading user organizations").from_db()
}}
}
Expand Down

0 comments on commit 7509d46

Please sign in to comment.