Commit 994914ff by Albert (AJ) St. Aubin Committed by GitHub

Merge pull request #955 from edx/efischer/tnl-6093

Allow cancellation of buggy workflow
parents fd00c5f3 44c29d46
......@@ -19,6 +19,7 @@ from django.utils.timezone import now
from model_utils import Choices
from model_utils.models import StatusModel, TimeStampedModel
from submissions import api as sub_api
from openassessment.assessment.errors.base import AssessmentError
from openassessment.assessment.signals import assessment_complete_signal
from .errors import AssessmentApiLoadError, AssessmentWorkflowError, AssessmentWorkflowInternalError
......@@ -507,7 +508,11 @@ class AssessmentWorkflow(TimeStampedModel, StatusModel):
if on_cancel_func is not None:
on_cancel_func(self.submission_uuid)
score = self.get_score(assessment_requirements, step_for_name)
try:
score = self.get_score(assessment_requirements, step_for_name)
except AssessmentError as exc:
logger.info("TNL-5799, exception in get_score during cancellation. {}".format(exc))
score = None
# Set the points_earned to 0.
if score is not None:
......
......@@ -7,7 +7,7 @@ freezegun==0.1.11
mock==1.0.1
moto==0.3.1
pep8==1.7.0
factory_boy==2.6.1
factory_boy==2.8.1
git+https://github.com/edx/django-pyfs.git@1.0.3#egg=django-pyfs==1.0.3
git+https://github.com/edx/i18n-tools.git@56f048af9b6868613c14aeae760548834c495011#egg=i18n_tools
......
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