diff --git a/pulpcore/app/models/task.py b/pulpcore/app/models/task.py index 12fbf0f995..9b63ce92e9 100644 --- a/pulpcore/app/models/task.py +++ b/pulpcore/app/models/task.py @@ -215,7 +215,7 @@ def set_completed(self): if rows != 1: # If the user requested to cancel this task while the worker finished it, we leave it # as it is, but accept this is not an error condition. - if self.state != TASK_STATES.CANCELLING: + if self.state != TASK_STATES.CANCELING: raise RuntimeError( _("Attempt to set not running task {} to completed from '{}'.").format( self.pk, self.state