diff --git a/stockcli/stock.py b/stockcli/stock.py --- a/stockcli/stock.py +++ b/stockcli/stock.py @@ -1,3 +1,4 @@ +import logging from operator import itemgetter from typing import Any @@ -130,6 +131,7 @@ def transfer_by_barcode(barcode: str) -> ) if not from_id: + logging.debug("User aborted task!") return grid = Table.grid(padding=DEFAULT_PADDING) @@ -159,11 +161,13 @@ def transfer_by_barcode(barcode: str) -> ) if not to_id: + logging.debug("User aborted task!") return amount = int_prompt.ask("Amount (Enter 0 to abort)") if not amount: + logging.debug("User aborted task!") return data = {"amount": amount, "location_id_from": from_id, "location_id_to": to_id} @@ -200,6 +204,7 @@ def add_by_barcode(barcode: str) -> None amount = int_prompt.ask("Amount (Enter 0 to abort)") if not amount: + logging.debug("User aborted task!") return data = {"amount": amount, "transaction_type": "purchase"} @@ -238,6 +243,7 @@ def update_by_barcode(barcode: str) -> N amount = int_prompt.ask("Amount (Enter 0 to abort)") if not amount: + logging.debug("User aborted task!") return data = {