diff --git a/app/main.py b/app/main.py index b8c9096..937a394 100644 --- a/app/main.py +++ b/app/main.py @@ -140,15 +140,15 @@ class AppWindow(FrontWindow): if self.tasks_station: try: result = self.SaleLine.get_data_command_and_task(args) + orders = result.get('orders', []) + tasks = result.get('tasks', []) except Exception: - logger.exception('Error de conexion internet') - orders = result['orders'] - tasks = result['tasks'] + logger.exception('Error de conexion internet obtener tareas y comandas') else: try: orders = self.SaleLine.get_data_command(args) except Exception: - logger.exception('Error de conexion internet') + logger.exception('Error de conexion internet obtener comanda') # TODO: for remove this option else: logger.warning('The backend sale_pos_frontend_rest is deprecation, update version') @@ -164,7 +164,6 @@ class AppWindow(FrontWindow): except Exception: logger.exception('Error de conexion internet al marcar tareas') - try: receipt = Receipt(context={}, environment='restaurant') result_print = receipt.print_tasks(tasks)