poprawa logiki liczenia w panelu
This commit is contained in:
11
app.py
11
app.py
@@ -779,7 +779,11 @@ def get_admin_expense_summary():
|
||||
active_lists = calc_sum(
|
||||
base.filter(
|
||||
ShoppingList.is_archived == False,
|
||||
or_(ShoppingList.expires_at == None, ShoppingList.expires_at > now),
|
||||
~(
|
||||
(ShoppingList.is_temporary == True) &
|
||||
(ShoppingList.expires_at != None) &
|
||||
(ShoppingList.expires_at <= now)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -790,8 +794,9 @@ def get_admin_expense_summary():
|
||||
expired_lists = calc_sum(
|
||||
base.filter(
|
||||
ShoppingList.is_archived == False,
|
||||
ShoppingList.expires_at != None,
|
||||
ShoppingList.expires_at <= now,
|
||||
(ShoppingList.is_temporary == True),
|
||||
(ShoppingList.expires_at != None),
|
||||
(ShoppingList.expires_at <= now),
|
||||
)
|
||||
)
|
||||
|
||||
|
Reference in New Issue
Block a user