diff --git a/seller_models/models.py b/seller_models/models.py index bf45063..a7cd71e 100644 --- a/seller_models/models.py +++ b/seller_models/models.py @@ -33,7 +33,7 @@ class SupplierProfile(models.Model): return "" class Product(models.Model): - supplier = models.ForeignKey(SupplierProfile, on_delete=models.DO_NOTHING, db_column='supplier_id') + supplier = models.ForeignKey(SupplierProfile, on_delete=models.DO_NOTHING, db_column='supplier_id', to_field='user_id', null=True, blank=True) title = models.CharField(max_length=255) category = models.CharField(max_length=100, blank=True, null=True) price = models.DecimalField(max_digits=10, decimal_places=2)