usuniecie zbednego kodu i poprawki
This commit is contained in:
12
app.py
12
app.py
@@ -2882,6 +2882,15 @@ def list_products():
|
||||
if name not in used_suggestion_names
|
||||
]
|
||||
|
||||
usage_counts = dict(
|
||||
db.session.query(
|
||||
func.lower(Item.name),
|
||||
func.coalesce(func.sum(Item.quantity), 0)
|
||||
)
|
||||
.group_by(func.lower(Item.name))
|
||||
.all()
|
||||
)
|
||||
|
||||
query_string = urlencode({k: v for k, v in request.args.items() if k != "page"})
|
||||
|
||||
return render_template(
|
||||
@@ -2894,7 +2903,8 @@ def list_products():
|
||||
per_page=per_page,
|
||||
total_pages=total_pages,
|
||||
query_string=query_string,
|
||||
total_items=total_items
|
||||
total_items=total_items,
|
||||
usage_counts=usage_counts
|
||||
)
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user