X-Git-Url: https://apps.delaporte.us/gitweb/matrix-shop-bot.git/blobdiff_plain/895434f80adf39e2122f592c09a8ade36209a8a7..d3e89743c10b7d8a5d4367471995366afa8d497c:/matrix_shop_bot/tasks.py?ds=sidebyside diff --git a/matrix_shop_bot/tasks.py b/matrix_shop_bot/tasks.py index 54cafd1..4b8631a 100644 --- a/matrix_shop_bot/tasks.py +++ b/matrix_shop_bot/tasks.py @@ -39,10 +39,16 @@ def clear_list(c, store_id): @task -def list(c, store_id_str=None): +def list_for_store(c, store_id): + items = Data().get_shopping_list_for_store(store_id) + for item in items: + print(item) - store_id = int(store_id_str) if store_id_str else None - items = Data().get_shopping_list(store_id) + +@task +def list(c): + '''Use previous store''' + items = Data().get_last_shopping_list() for item in items: print(item)