feat: fixed bugs

This commit is contained in:
martsforever
2025-09-13 10:02:35 +08:00
parent 510723e8d3
commit ecb66d4eda
+2 -2
View File
@@ -100,9 +100,9 @@ class ReimburseModel(BasicModel, table=True):
def amount(self) -> Decimal:
ret = Decimal(0)
for other_item in (self.other_list or []):
ret = ret + Decimal(other_item.amount)
ret = ret + (Decimal(other_item.amount) if other_item.amount is not None else 0)
for travel_item in (self.travel_list or []):
ret = ret + Decimal(travel_item.amount)
ret = ret + (Decimal(travel_item.amount) if travel_item.amount is not None else 0)
return ret
@amount.setter