From 11f9c4150c72ee280c9c322e223ef4ef3c7e1e8b 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 (cherry picked from commit 15c018273686c6d52cd81d427840f1124cf477e2) --- 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 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