Commit 56f00438 by Chris Dodge

reduce logging severity from exception to error

parent be55e36d
...@@ -320,7 +320,7 @@ def remove_credit_requirement_status(username, course_key, req_namespace, req_na ...@@ -320,7 +320,7 @@ def remove_credit_requirement_status(username, course_key, req_namespace, req_na
# but that could cause serious performance issues if many users attempt to # but that could cause serious performance issues if many users attempt to
# lock the row at the same time. # lock the row at the same time.
# Instead, we skip removing the requirement and log an error. # Instead, we skip removing the requirement and log an error.
if req_to_remove is None: if not req_to_remove:
log.error( log.error(
( (
u'Could not remove credit requirement in course "%s" ' u'Could not remove credit requirement in course "%s" '
......
...@@ -482,7 +482,13 @@ class CreditRequirementStatus(TimeStampedModel): ...@@ -482,7 +482,13 @@ class CreditRequirementStatus(TimeStampedModel):
requirement_status = cls.objects.get(username=username, requirement=requirement) requirement_status = cls.objects.get(username=username, requirement=requirement)
requirement_status.delete() requirement_status.delete()
except cls.DoesNotExist: except cls.DoesNotExist:
log.exception(u'The requirement status does not exist against the username %s.', username) log_msg = (
u'The requirement status {requirement} does not exist for username {username}.'.format(
requirement=requirement,
username=username
)
)
log.error(log_msg)
return return
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment