From 99e71b0904702658102455a60f0df6c36c6ce4b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=B9=8F=E5=AE=87?= <9664676+pengyuthon@user.noreply.gitee.com> Date: Wed, 22 Oct 2025 18:19:31 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../models/property_lease_contract.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/yuthon_property_approval/models/property_lease_contract.py b/yuthon_property_approval/models/property_lease_contract.py index e96ae0e76..384b6d383 100644 --- a/yuthon_property_approval/models/property_lease_contract.py +++ b/yuthon_property_approval/models/property_lease_contract.py @@ -653,9 +653,11 @@ class PropertyLeaseContract(models.Model): record.end_comparison = None else: record.end_comparison = None - - if record.actual_end_time < record.term_end_time: - record.end_comparison = 'red' + if record.term_end_time: + if record.actual_end_time < record.term_end_time: + record.end_comparison = 'red' + else: + record.end_comparison = None if record.actual_end_time == record.term_start_time: record.is_equal = True