Skip to content

Commit c028eca

Browse files
authored
Make bill rollback if git merge fails (#302)
1 parent dfa19e6 commit c028eca

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
@@ -11,6 +11,7 @@
1111
from celery import shared_task
1212
from celery.utils.log import get_task_logger
1313
from django.conf import settings
14+
from django.db import transaction
1415
from github import Auth
1516
from github import Github
1617
from github.Repository import Repository
@@ -22,6 +23,7 @@
2223

2324

2425
@shared_task
26+
@transaction.atomic
2527
def submit_bill(bill_id: int) -> None:
2628
"""Handles the final processing and closing of a bill
2729

0 commit comments

Comments
 (0)