From acb5d9c0daaa7f719b04c8c1438acdf91998be6b Mon Sep 17 00:00:00 2001 From: Thomas Steen Rasmussen Date: Wed, 1 Jun 2016 01:30:05 +0200 Subject: [PATCH] add a few debug lines --- shop/views.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/shop/views.py b/shop/views.py index 3504dfd2..90b79e2c 100644 --- a/shop/views.py +++ b/shop/views.py @@ -392,6 +392,7 @@ class CoinifyRedirectView(LoginRequiredMixin, EnsureUserOwnsOrderMixin, EnsureUn # check if it expired if parse_datetime(order.coinifyapiinvoice.invoicejson['expire_time']) < timezone.now(): # this coinifyinvoice expired, delete it + print "deleting expired coinifyinvoice id %s" % order.coinifyapiinvoice.invoicejson['id'] order.coinifyapiinvoice.delete() order = self.get_object() @@ -426,11 +427,11 @@ class CoinifyRedirectView(LoginRequiredMixin, EnsureUserOwnsOrderMixin, EnsureUn return HttpResponseRedirect(reverse_lazy('shop:order_detail', kwargs={'pk': self.get_object().pk})) else: # save this coinify invoice - CoinifyAPIInvoice.objects.create( + coinifyinvoice = CoinifyAPIInvoice.objects.create( invoicejson = response['data'], order = order, ) - + print "created new coinifyinvoice id %s" % coinifyinvoice.invoicejson['id'] return super(CoinifyRedirectView, self).dispatch( request, *args, **kwargs )