Permalink
Browse files

Do not remove products on manufacturer delete

  • Loading branch information...
1 parent 4644326 commit 323c3da04061831c17a7ab2670a4db256725e660 @pigletto pigletto committed Jan 20, 2013
Showing with 2 additions and 1 deletion.
  1. +2 −1 lfs/catalog/models.py
View
@@ -678,7 +678,8 @@ class Product(models.Model):
# Manufacturer
sku_manufacturer = models.CharField(_(u"SKU Manufacturer"), blank=True, max_length=100)
- manufacturer = models.ForeignKey(Manufacturer, verbose_name=_(u"Manufacturer"), blank=True, null=True, related_name="products")
+ manufacturer = models.ForeignKey(Manufacturer, verbose_name=_(u"Manufacturer"), blank=True, null=True,
+ related_name="products", on_delete=models.SET_NULL)
type_of_quantity_field = models.PositiveSmallIntegerField(_(u"Type of quantity field"), blank=True, null=True, choices=QUANTITY_FIELD_TYPES)
objects = ActiveManager()

0 comments on commit 323c3da

Please sign in to comment.