From 8fba079d5f14822d12709b3d669b48e891264705 Mon Sep 17 00:00:00 2001 From: Daniel Alley Date: Thu, 9 Jan 2025 14:22:05 -0500 Subject: [PATCH] Fix typo in task state logic --- pulpcore/app/models/task.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pulpcore/app/models/task.py b/pulpcore/app/models/task.py index 7a8cfea625..4296362f9d 100644 --- a/pulpcore/app/models/task.py +++ b/pulpcore/app/models/task.py @@ -226,7 +226,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