Merge pull request #16247 from edx/pwnage101/avoid_implicit__in_query_PLAT-1525
Use singular getter function where only one requirement is expected
This commit is contained in:
@@ -297,7 +297,7 @@ def remove_credit_requirement_status(username, course_key, req_namespace, req_na
|
||||
"""
|
||||
|
||||
# Find the requirement we're trying to remove
|
||||
req_to_remove = CreditRequirement.get_course_requirements(course_key, namespace=req_namespace, name=req_name)
|
||||
req_to_remove = CreditRequirement.get_course_requirement(course_key, req_namespace, req_name)
|
||||
|
||||
# If we can't find the requirement, then the most likely explanation
|
||||
# is that there was a lag removing the credit requirements after the course
|
||||
|
||||
@@ -385,7 +385,7 @@ class CreditRequirement(TimeStampedModel):
|
||||
name(str): Name of credit course requirement
|
||||
|
||||
Returns:
|
||||
CreditRequirement object if exists
|
||||
CreditRequirement object if exists, None otherwise.
|
||||
|
||||
"""
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user