Avoid left join when filtering for channel permissions#2948
Merged
jredrejo merged 1 commit intolearningequality:hotfixesfrom Feb 15, 2021
Merged
Avoid left join when filtering for channel permissions#2948jredrejo merged 1 commit intolearningequality:hotfixesfrom
jredrejo merged 1 commit intolearningequality:hotfixesfrom
Conversation
Codecov Report
@@ Coverage Diff @@
## hotfixes #2948 +/- ##
============================================
+ Coverage 80.80% 85.58% +4.78%
============================================
Files 281 299 +18
Lines 12659 15887 +3228
============================================
+ Hits 10229 13597 +3368
+ Misses 2430 2290 -140
Continue to review full report at Codecov.
|
rtibbles
approved these changes
Feb 15, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
filter_view_querysetwas adding a left join on Invitations that was causing duplicated results when showing a list of channels.This pr replaces the used query using only the list of pending invitations the user has.
In any case I wonder if we should show to the user channels that have pending invitations
By the way: this issue hadn't been seen before because admins don't have this problem and most of LE staff are admins when testing Studio
Issue Addressed (if applicable)
Closes #2899
Before/After Screenshots (if applicable)
Documented in the refered issue
Steps to Test
Login as a non-admin user
Look at the list of channels and check there are not repated channels in the list