From 309547d464a751411ddabbbec3d66c38099b2cae Mon Sep 17 00:00:00 2001 From: Justin Lapierre Date: Mon, 29 Jun 2020 13:04:48 -0400 Subject: [PATCH] EDUCATOR-5080 - Updated doctring to represent the current behavior --- lms/djangoapps/teams/models.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/lms/djangoapps/teams/models.py b/lms/djangoapps/teams/models.py index cd50878222..40549de6b8 100644 --- a/lms/djangoapps/teams/models.py +++ b/lms/djangoapps/teams/models.py @@ -321,10 +321,7 @@ class CourseTeamMembership(models.Model): @classmethod def user_in_team_for_teamset(cls, user, course_id, topic_id=None): """ - Checks user membership in two ways: - if topic_id is None, checks to see if a user is assigned to any team in the teamsets associated with this - course. - if topic_id (teamset) is provided, checks to see if a user is assigned to a specific team in the course. + Using the provided topic_id (teamset), checks to see if a user is assigned to a specific team in the course. Args: user: the user that we want to query on @@ -332,7 +329,7 @@ class CourseTeamMembership(models.Model): topic_id: optional the topic_id (teamset) of the course we are interested in Returns: - True if the user is on a team in the course already + True if the user is on a team in a teamset in the course already False if not """ return cls.objects.filter(user=user, team__course_id=course_id, team__topic_id=topic_id).exists()