X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/d5a5399ebf7c51aae90dd4df2a803faaa08807d9..8ce01151b83453d8ccaa142178745e847b44cdb5:/src/paypal/rest.py diff --git a/src/paypal/rest.py b/src/paypal/rest.py index 25bb21ae9..11693cb8c 100644 --- a/src/paypal/rest.py +++ b/src/paypal/rest.py @@ -1,7 +1,7 @@ # This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later. # Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. # -from datetime import datetime, timedelta +from datetime import date, datetime, timedelta from decimal import Decimal import paypalrestsdk import pytz @@ -117,11 +117,6 @@ def check_agreement(agreement_id): return a.state == 'Active' -def user_is_subscribed(user): - agreements = BillingAgreement.objects.filter(user=user) - return any(agreement.check_agreement() for agreement in agreements) - - def execute_agreement(token): return paypalrestsdk.BillingAgreement.execute(token)