From 125083538acfec99b8bc5e0c55237040b2ca67a7 Mon Sep 17 00:00:00 2001 From: Chris Meyers Date: Tue, 3 Feb 2026 08:05:25 -0500 Subject: [PATCH] Compare float to float * https://sonarcloud.io/project/issues?open=AZDmRaXd2PiUXMD3dXkF&id=ansible_awx&tab=code --- awx/main/models/unified_jobs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/awx/main/models/unified_jobs.py b/awx/main/models/unified_jobs.py index d5fb23056d..b6e2bdecda 100644 --- a/awx/main/models/unified_jobs.py +++ b/awx/main/models/unified_jobs.py @@ -918,7 +918,7 @@ class UnifiedJob( # If we have a start and finished time, and haven't already calculated # out the time that elapsed, do so. - if self.started and self.finished and self.elapsed == 0.0: + if self.started and self.finished and self.elapsed == decimal.Decimal(0): td = self.finished - self.started elapsed = decimal.Decimal(td.total_seconds()) self.elapsed = elapsed.quantize(dq)