Commit 17caa6b1 by Eric Fischer Committed by Andy Armstrong

Change exception type

I misunderstood what was happening in my cursory investigation earlier -
all that needs to change here is the type of exception being caught.
parent ae6a8abe
...@@ -382,7 +382,7 @@ class AssessmentWorkflow(TimeStampedModel, StatusModel): ...@@ -382,7 +382,7 @@ class AssessmentWorkflow(TimeStampedModel, StatusModel):
# A staff step must always be available, to allow for staff overrides # A staff step must always be available, to allow for staff overrides
try: try:
self.steps.get(name=self.STATUS.staff) self.steps.get(name=self.STATUS.staff)
except AttributeError: except AssessmentWorkflowStep.DoesNotExist:
for step in list(self.steps.all()): for step in list(self.steps.all()):
step.order_num += 1 step.order_num += 1
self.steps.add( self.steps.add(
......
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