Skip to content

Commit

Permalink
Merge pull request #616 from GeekZoneHQ/BUG-392-Incorrect-stripe-hand…
Browse files Browse the repository at this point in the history
…off-

removed broken check
  • Loading branch information
Freshrojek authored Oct 2, 2022
2 parents 9477367 + a59d8c0 commit 1a3a4f2
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 15 deletions.
10 changes: 0 additions & 10 deletions memberships/payments.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,13 +103,3 @@ def failed_payment_email(member):
subject = "Your payment failed!"
body = "Something seems to have gone wrong with your payment."
task_send_email(member.preferred_name, member.email, subject, body)


def check_member_paying(user):
try:
membership = Membership.objects.get(member=user.member)
if membership.payment_status is None:
return False
except Membership.DoesNotExist:
return False
return True
6 changes: 1 addition & 5 deletions memberships/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
from django.utils.decorators import method_decorator
from datetime import datetime, timedelta

from .payments import handle_stripe_payment, check_member_paying
from .payments import handle_stripe_payment
from .forms import *
from .models import Member, Membership
from .services import StripeGateway
Expand Down Expand Up @@ -197,8 +197,6 @@ def stripe_webhook(request):

@login_required()
def details_view(request):
if not check_member_paying(request.user):
return HttpResponseRedirect(reverse("confirm"))

user = request.user
verified = False
Expand All @@ -217,8 +215,6 @@ def details_view(request):

@login_required()
def settings_view(request):
if not check_member_paying(request.user):
return HttpResponseRedirect(reverse("confirm"))

if not request.method == "POST":
return render(
Expand Down

0 comments on commit 1a3a4f2

Please sign in to comment.