zmiana month na m i poprawka w kolorach paginaci
This commit is contained in:
15
app.py
15
app.py
@@ -1336,6 +1336,21 @@ def main_page():
|
||||
.order_by(ShoppingList.created_at.desc())
|
||||
.all()
|
||||
)
|
||||
|
||||
# Definiujemy widoczny zakres list dla tego użytkownika
|
||||
if current_user.is_authenticated:
|
||||
visible_lists_query = ShoppingList.query.filter(
|
||||
or_(
|
||||
ShoppingList.owner_id == current_user.id,
|
||||
ShoppingList.is_public == True
|
||||
)
|
||||
)
|
||||
else:
|
||||
visible_lists_query = ShoppingList.query.filter(
|
||||
ShoppingList.is_public == True
|
||||
)
|
||||
|
||||
# Teraz możemy bezpiecznie pobrać miesiące
|
||||
month_options = get_active_months_query(visible_lists_query)
|
||||
|
||||
all_lists = user_lists + public_lists + archived_lists
|
||||
|
Reference in New Issue
Block a user