fix: updates get_all_learners
to remove _get_implicit_group_members
#2262
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
Fixes a reported bug by updating the logic to get the accepted members count from a group.
AttributeError: 'list' object has no attribute 'filter'
Previously, we were attempting to apply a filter on the
get_all_learners()
method for groups that haveapplies_to_all_contexts
enabled and disabled. However, theget_all_learners
method returns a list of all members when a group hasapplies_to_all_contexts
enabled instead of a queryset, which resulted in the error.This PR updates
get_all_learners
to remove_get_implicit_group_members
which was returning a list.https://2u-internal.atlassian.net/browse/ENT-9598
Test
Merge checklist:
requirements/*.txt
files)base.in
if needed in production but edx-platform doesn't install ittest-master.in
if edx-platform pins it, with a matching versionmake upgrade && make requirements
have been run to regenerate requirementsmake static
has been run to update webpack bundling if any static content was updated./manage.py makemigrations
has been run./manage.py lms makemigrations
in the shell.Post merge:
(so basically once your build finishes, after maybe a minute you should see the new version in PyPi automatically (on refresh))
make upgrade
in edx-platform will look for the latest version in PyPi.