Merge pull request #12 from xoliqberdiyev/test

fix
This commit is contained in:
xoliqberdiyev
2025-10-06 18:16:56 +05:00
committed by GitHub
2 changed files with 19 additions and 1 deletions

View File

@@ -0,0 +1,18 @@
# Generated by Django 5.2.4 on 2025-10-06 18:14
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('products', '0006_alter_product_type'),
]
operations = [
migrations.AlterField(
model_name='product',
name='name',
field=models.CharField(max_length=200, unique=True),
),
]

View File

@@ -12,7 +12,7 @@ class Product(BaseModel):
("SERVICE", 'xizmat') ("SERVICE", 'xizmat')
) )
name = models.CharField(max_length=200) name = models.CharField(max_length=200, unique=True)
type = models.CharField(max_length=20, choices=TYPE, default="TANGIBLE") type = models.CharField(max_length=20, choices=TYPE, default="TANGIBLE")
unity = models.ForeignKey( unity = models.ForeignKey(
'products.Unity', on_delete=models.SET_NULL, related_name='products', null=True 'products.Unity', on_delete=models.SET_NULL, related_name='products', null=True