Skip to content

Commit

Permalink
transaction for thread creation
Browse files Browse the repository at this point in the history
  • Loading branch information
catgirlinspace committed Nov 29, 2023
1 parent 0d907e6 commit b251005
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions assistant/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import django_htmx.http
from django.conf import settings
from django.contrib.auth.decorators import login_required
from django.db import transaction
from django.http import HttpResponseBadRequest
from django.shortcuts import redirect, get_object_or_404, render
from django.views.decorators.http import require_POST
Expand Down Expand Up @@ -38,6 +39,7 @@ def threads(request):

@login_required
@require_sponsor_tier
@transaction.atomic
def create_thread(request):
if request.method == "GET":
form = CreateThreadForm()
Expand Down

0 comments on commit b251005

Please sign in to comment.