mirror of
https://github.com/zulip/zulip.git
synced 2025-11-02 04:53:36 +00:00
lint: Enforce consistent style of using transaction.atomic decorator.
When decorating a function, @transaction.atomic and @transaction.atomic() are equivalent. We can add a linting rule to enforce consistency.
This commit is contained in:
committed by
Tim Abbott
parent
bc3d03730f
commit
323f5dbba2
@@ -21,7 +21,7 @@ def set_expiry_date_for_existing_confirmations(
|
||||
UNSUBSCRIBE = 4
|
||||
MULTIUSE_INVITE = 6
|
||||
|
||||
@transaction.atomic()
|
||||
@transaction.atomic
|
||||
def backfill_confirmations_between(lower_bound: int, upper_bound: int) -> None:
|
||||
confirmations = Confirmation.objects.filter(id__gte=lower_bound, id__lte=upper_bound)
|
||||
for confirmation in confirmations:
|
||||
|
||||
Reference in New Issue
Block a user