Features: 1) Add sku field to multiple serializers and GraphQL object types for better product identification;
Fixes: 1) Remove unnecessary `IntegrityError` import in 0038_backfill_product_sku migration; Extra: 1) Minor formatting cleanup in migration files.
This commit is contained in:
parent
ec147984ab
commit
4e2c4c7ccb
5 changed files with 4 additions and 2 deletions
|
|
@ -507,6 +507,7 @@ class ProductType(DjangoObjectType):
|
|||
interfaces = (relay.Node,)
|
||||
fields = (
|
||||
"uuid",
|
||||
"sku",
|
||||
"category",
|
||||
"brand",
|
||||
"tags",
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
from django.db import migrations, transaction, IntegrityError
|
||||
from django.db import migrations, transaction
|
||||
|
||||
|
||||
def generate_unique_sku(Product, make_candidate, taken):
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@ from django.db import migrations, models
|
|||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
("core", "0038_backfill_product_sku"),
|
||||
]
|
||||
|
|
|
|||
|
|
@ -326,6 +326,7 @@ class ProductDetailSerializer(ModelSerializer):
|
|||
model = Product
|
||||
fields = [
|
||||
"uuid",
|
||||
"sku",
|
||||
"name",
|
||||
"description",
|
||||
"partnumber",
|
||||
|
|
|
|||
|
|
@ -163,6 +163,7 @@ class ProductSimpleSerializer(ModelSerializer):
|
|||
fields = [
|
||||
"uuid",
|
||||
"name",
|
||||
"sku",
|
||||
"is_digital",
|
||||
"slug",
|
||||
"description",
|
||||
|
|
|
|||
Loading…
Reference in a new issue