GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||||
GeezerVison is showing github.com — Add a public filter to the kolibri-public's ChannelMetadata viewset by taoerman · Pull Request #5486 · learningequality/studio Conversation
Contributor
SummaryAdded a public filter to the ChannelMetadataViewSet that defaults to only returning public channels, preventing community channels from appearing in Kolibri's main Library listing. The filter allows explicit access to community channels via ?public=false while maintaining backward compatibility. Added comprehensive tests to verify the filtering behavior works correctly for both public and community channels. I also used postman and local Kolibri to manually test public filter. ReferencesReviewer guidancerun unit tests.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions…into add-public-filter fix bug
AlexVelezLl
reviewed
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks @taoerman! This solution looks good, and it is fixing the error of returning the Community Channels in the public channels endpoint! I just noticed one potential improvement in the channelmetadata viewset test suite, and a question to get a more idiomatic implementation for the default filter value. Thanks!
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The tests in this test suite are meant to be run for Community Library channels (e.g. they are being set the
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks Alex, I've update the client.get method.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Great!
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Comment on lines
+169
to
+174
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. (Non-blocking) Did you have a chance to look at the using initial values as default for Filterset fields? It seems like a more idiomatic way to set the public filter if it's not present. Let's chat! If this doesn't look like the best solution, I think a better option would be to implement this in
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks, I've added a new filter according to the document and added default value as well.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
AlexVelezLl
approved these changes
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Code changes look good, tests provide good confidence, and manual QA checks out. Thanks @taoerman!
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
1 task
AllanOXDi
pushed a commit
to AllanOXDi/studio
that referenced
this pull request
…earningequality#5486) * Add a public filter to the kolibri-public's ChannelMetadata viewset * [pre-commit.ci lite] apply automatic fixes * fix test_channelmetadata_viewset.py * [pre-commit.ci lite] apply automatic fixes * fix code according to comments * [pre-commit.ci lite] apply automatic fixes * fix linting * fix linting * [pre-commit.ci lite] apply automatic fixes --------- Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ReviewersUh oh!
There was an error while loading. Please reload this page. AssigneesLabels
None yet
ProjectsMilestoneNo milestoneDevelopmentSuccessfully merging this pull request may close these issues. Uh oh!
There was an error while loading. Please reload this page. 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. | ||||||||||||||||||||||||||||||
| You are visitor 01402775 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |