from rowers.models import Rower, PaidPlan # run once - copies plans to paypal def planstopaypal(): # pragma: no cover plans = PaidPlan.objects.all() for plan in plans: plan.pk = None plan.paymentprocessor = 'paypal' plan.external_id = None plan.save() def is_existing_customer(rower): # pragma: no cover if rower.country is not None and rower.customer_id is not None and rower.country != '': if rower.subscription_id is None or rower.subscription_id == '': return False else: return True return False