From 44ca37e51b5bd57b8c2df10a2f4cba67be26491c 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: Mon, 16 Mar 2026 12:06:23 +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 --- yuthon_property/models/yuthon_property.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yuthon_property/models/yuthon_property.py b/yuthon_property/models/yuthon_property.py index ab1762419..056e5db48 100644 --- a/yuthon_property/models/yuthon_property.py +++ b/yuthon_property/models/yuthon_property.py @@ -113,7 +113,7 @@ class YuthonProperty(models.Model): if contract_lines: sorted_lines = sorted( contract_lines, - key=lambda line: line.lease_id.actual_end_time, + key=lambda line: line.lease_id.actual_end_time or date.max, reverse=True ) lease_id = sorted_lines[0]