From 00031933f6c562421f65be6ee1ea61b920ed4b17 Mon Sep 17 00:00:00 2001 From: spacenergy Date: Wed, 2 Mar 2016 09:07:55 +0600 Subject: [PATCH] auto --- store/models.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/store/models.py b/store/models.py index 9251491..49d9e98 100644 --- a/store/models.py +++ b/store/models.py @@ -259,7 +259,8 @@ class ProductVariation(models.Model): return self.variation def get_price(self, profile=None): - if profile and self.product.brand.slug in ['beuchat', 'scorpena']: + #import pdb; pdb.set_trace() + if profile and profile.is_authenticated() and self.product.brand.slug in ['beuchat', 'scorpena']: return int(self.price - (self.price / Decimal(100) * Decimal(profile.sale))) else: print(profile)