feat: fixed bugs
This commit is contained in:
@@ -100,9 +100,9 @@ class ReimburseModel(BasicModel, table=True):
|
|||||||
def amount(self) -> Decimal:
|
def amount(self) -> Decimal:
|
||||||
ret = Decimal(0)
|
ret = Decimal(0)
|
||||||
for other_item in (self.other_list or []):
|
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 []):
|
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
|
return ret
|
||||||
|
|
||||||
@amount.setter
|
@amount.setter
|
||||||
|
|||||||
Reference in New Issue
Block a user