X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/d5a5399ebf7c51aae90dd4df2a803faaa08807d9..ecd1f5bc214a8ba61b65d4d00a7e7d09a8c8fa3a:/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)