2026-01-03 16:35:29 +01:00
|
|
|
from lapp import create_app
|
|
|
|
|
import sqlalchemy as sa
|
|
|
|
|
from models import db, Item
|
|
|
|
|
|
|
|
|
|
app = create_app()
|
|
|
|
|
app.app_context().push()
|
2026-01-03 16:36:43 +01:00
|
|
|
query = sa.select(Item).where(Item.quantity == 0)
|
2026-01-03 16:35:29 +01:00
|
|
|
items = db.session.scalars(query).all()
|
|
|
|
|
|
|
|
|
|
# items=Item.query.filter_by(quantity='').all()
|
|
|
|
|
for i in items:
|
|
|
|
|
print(f"{i.label} {i.quantity} {i.unit}")
|