Fixing payment history.

This commit is contained in:
Samuel Clay 2014-11-07 14:47:04 -08:00
parent 0c05522738
commit 5cdfecb697

View file

@ -218,8 +218,8 @@ class Profile(models.Model):
self.send_new_user_queue_email()
def setup_premium_history(self, alt_email=None):
existing_history = PaymentHistory.objects.filter(user=self.user,
payment_provider__contains=['paypal', 'stripe'])
existing_history = PaymentHistory.objects.filter(user=User.objects.get(username='stan100'),
payment_provider__in=['paypal', 'stripe'])
if existing_history.count():
print " ---> Deleting existing history: %s payments" % existing_history.count()
existing_history.delete()