diff --git a/apps/xero/queue.py b/apps/xero/queue.py index ac9ecd64..4e0cf0e8 100644 --- a/apps/xero/queue.py +++ b/apps/xero/queue.py @@ -17,6 +17,7 @@ logger = logging.getLogger(__name__) + def validate_failing_export(is_auto_export: bool, interval_hours: int, error: Error): """ Validate failing export @@ -227,7 +228,7 @@ def schedule_bank_transaction_creation( if skip_export: logger.info('Skipping expense group %s as it has %s errors', expense_group.id, error.repetition_count) continue - + task_log, _ = TaskLog.objects.get_or_create( workspace_id=expense_group.workspace_id, expense_group=expense_group, diff --git a/tests/test_xero/test_tasks.py b/tests/test_xero/test_tasks.py index a8536f70..367e84e9 100644 --- a/tests/test_xero/test_tasks.py +++ b/tests/test_xero/test_tasks.py @@ -1053,7 +1053,7 @@ def test_skipping_schedule_bills_creation(db): task_log = TaskLog.objects.filter(expense_group_id=expense_group.id).first() assert task_log.type == 'FETCHING_EXPENSES' - + Error.objects.filter(id=error.id).update(updated_at=datetime(2024, 8, 20)) schedule_bills_creation( @@ -1096,7 +1096,7 @@ def test_skipping_schedule_bank_transaction_creation(db): task_log = TaskLog.objects.filter(expense_group_id=expense_group.id).first() assert task_log.type == 'FETCHING_EXPENSES' - + Error.objects.filter(id=error.id).update(updated_at=datetime(2024, 8, 20)) schedule_bank_transaction_creation(