From cb64228436fd1e3107b9c4c551a0c021d4f02f94 Mon Sep 17 00:00:00 2001 From: Nathan Freeman Date: Mon, 13 May 2024 12:25:29 -0500 Subject: [PATCH] Replace references to acquired prop on PipelineLock with acquired_at --- src/api/src/backend/views/PipelineLocks.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/api/src/backend/views/PipelineLocks.py b/src/api/src/backend/views/PipelineLocks.py index a9c9a419..98c65d23 100644 --- a/src/api/src/backend/views/PipelineLocks.py +++ b/src/api/src/backend/views/PipelineLocks.py @@ -107,11 +107,11 @@ def post(self, request, group_id, pipeline_id): # pipeline lock's 'acquired' property to 'true' if pipeline_lock.pipeline_run.uuid == competing_runs[0]: acquired_at = timezone.now() - pipeline_lock.object.update(acquired=True, acquired_at=acquired_at) + pipeline_lock.object.update(acquired_at=acquired_at) # Set the message for the pipeline lock acquisition attempt message = f"Lock not acquired. Locks ahead of '{str(pipeline_lock.uuid)}'" - if pipeline_lock.acquired: + if pipeline_lock.acquired_at != None: message = f"Pipeline Lock acquired by '{str(pipeline_lock.uuid)}'" return BaseResponse(