Skip to content

Commit adf853a

Browse files
committed
Make bill rollback if git merge fails
1 parent d7cfec9 commit adf853a

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

democrasite/webiscite/tasks.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
from celery import shared_task
1010
from celery.utils.log import get_task_logger
1111
from django.conf import settings
12+
from django.db import transaction
1213
from github import Auth
1314
from github import Github
1415
from github.Repository import Repository
@@ -20,6 +21,7 @@
2021

2122

2223
@shared_task
24+
@transaction.atomic
2325
def submit_bill(bill_id: int) -> None:
2426
"""Handles the final processing and closing of a bill
2527

0 commit comments

Comments
 (0)