Skip to content

Commit

Permalink
fixed flake
Browse files Browse the repository at this point in the history
  • Loading branch information
Ashutosh619-sudo committed Aug 26, 2024
1 parent 8d72a07 commit 2b1408f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion apps/xero/queue.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

logger = logging.getLogger(__name__)


def validate_failing_export(is_auto_export: bool, interval_hours: int, error: Error):
"""
Validate failing export
Expand Down Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions tests/test_xero/test_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit 2b1408f

Please sign in to comment.