]> apps.delaporte.us Git - matrix-shop-bot.git/blobdiff - matrix_shop_bot/tasks.py
Set prefered store
[matrix-shop-bot.git] / matrix_shop_bot / tasks.py
index 54cafd188d2a85407653e560b7cd997524693d2b..4b8631a6a88820d936098588ea0b191a9f556cf8 100644 (file)
@@ -39,10 +39,16 @@ def clear_list(c, store_id):
 
 
 @task
 
 
 @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)
 
     for item in items:
         print(item)