|
|
@@ -331,7 +331,7 @@ class AbstractProduct(models.Model):
|
|
331
|
331
|
|
|
332
|
332
|
|
|
333
|
333
|
class ProductRecommendation(models.Model):
|
|
334
|
|
- u"""
|
|
|
334
|
+ """
|
|
335
|
335
|
'Through' model for product recommendations
|
|
336
|
336
|
"""
|
|
337
|
337
|
primary = models.ForeignKey('catalogue.Product', related_name='primary_recommendations')
|
|
|
@@ -380,7 +380,7 @@ class ProductAttributesContainer(object):
|
|
380
|
380
|
'err': e})
|
|
381
|
381
|
|
|
382
|
382
|
def get_values(self):
|
|
383
|
|
- return self.product.productattributevalue_set.all()
|
|
|
383
|
+ return self.product.attribute_values.all()
|
|
384
|
384
|
|
|
385
|
385
|
def get_value_by_attribute(self, attribute):
|
|
386
|
386
|
return self.get_values().get(attribute=attribute)
|
|
|
@@ -494,7 +494,7 @@ class AbstractProductAttribute(models.Model):
|
|
494
|
494
|
|
|
495
|
495
|
def save_value(self, product, value):
|
|
496
|
496
|
try:
|
|
497
|
|
- value_obj = product.productattributevalue_set.get(attribute=self)
|
|
|
497
|
+ value_obj = product.attribute_values.get(attribute=self)
|
|
498
|
498
|
except get_model('catalogue', 'ProductAttributeValue').DoesNotExist:
|
|
499
|
499
|
if value == None or value == '':
|
|
500
|
500
|
return
|