Skip to content

Commit

Permalink
Merge branch 'dev' of github.com:sweeftdigital/accounts_G2 into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
nika-alaverdashvili committed Nov 5, 2024
2 parents f2f506d + 7032e7e commit 11d7b07
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions payments/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -572,9 +572,6 @@ def get_queryset(self):
"-created_at"
)

if not queryset.exists():
raise NotFound(detail=_("No payments found for this user."))

return queryset


Expand All @@ -587,9 +584,6 @@ class UserPaymentStatsView(APIView):
def get(self, request):
user_payments = Payment.objects.filter(customer=request.user)

if not user_payments.exists():
raise NotFound(detail=_("No payments found for this user."))

all_time_stats = user_payments.aggregate(
total_amount=Sum("amount"), transaction_count=Count("id")
)
Expand Down

0 comments on commit 11d7b07

Please sign in to comment.