Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed the atomic transaction issue #1768

Open
wants to merge 20 commits into
base: main
Choose a base branch
from
Open
Changes from 12 commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
770ae28
Fixed incorrect pluralization of LocalDjangoCommunity in admin - Issu…
arpan8925 Nov 16, 2024
b051a8d
Merge pull request #1 from arpan8925/arpan8925-issue1739
arpan8925 Nov 16, 2024
2b5ac70
Merge branch 'django:main' into main
arpan8925 Nov 20, 2024
6b3ec85
update
arpan8925 Nov 23, 2024
a44d056
atomic transaction issue - fixed
arpan8925 Nov 23, 2024
276b6fd
Update
arpan8925 Nov 23, 2024
656e5f7
Merge pull request #2 from arpan8925/Issue-1764
arpan8925 Nov 23, 2024
f3ab5ef
Merge branch 'django:main' into arpan8925---issue1764
arpan8925 Nov 23, 2024
f2f4632
Merge pull request #3 from arpan8925/arpan8925---issue1764
arpan8925 Nov 23, 2024
4075d2a
Merge branch 'main' of https://github.com/arpan8925/djangoproject.com
arpan8925 Nov 23, 2024
bd1d979
fix the atomic transaction issue
arpan8925 Nov 23, 2024
bcfc89d
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Nov 23, 2024
e231f3e
Fixed Issue 1764
arpan8925 Nov 24, 2024
7bb55a7
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Nov 24, 2024
0767339
test_webhook, Tested & Working
arpan8925 Nov 25, 2024
e428c56
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Nov 25, 2024
26eb17e
Teseted tox locally
arpan8925 Nov 25, 2024
646ec8c
Merge branch 'arpan8925-issue1764' of https://github.com/arpan8925/dj…
arpan8925 Nov 25, 2024
ea2e7b8
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Nov 25, 2024
2f7f069
Update views.py
arpan8925 Nov 25, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions fundraising/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from django.conf import settings
from django.contrib import messages
from django.core.mail import send_mail
from django.db import transaction
from django.forms.models import modelformset_factory
from django.http import HttpResponse, JsonResponse
from django.shortcuts import get_object_or_404, redirect, render
Expand Down Expand Up @@ -290,10 +291,14 @@ def get_donation_interval(self, session):
else:
return "monthly"

@transaction.atomic
def checkout_session_completed(self):
"""
> Occurs when a Checkout Session has been successfully completed.
https://stripe.com/docs/api/events/types#event_types-checkout.session.completed

All database operations are now wrapped in a transaction - if any operation fails,
all changes will be rolled back to maintain data consistency.
arpan8925 marked this conversation as resolved.
Show resolved Hide resolved
"""
session = self.event.data.object
# TODO: remove stripe_version when updating account settings.
Expand Down