product id response
This commit is contained in:
@@ -91,9 +91,9 @@ class DynamicProductSerializer(serializers.ModelSerializer):
|
|||||||
model = ProductModel
|
model = ProductModel
|
||||||
fields = "__all__"
|
fields = "__all__"
|
||||||
view_type = {
|
view_type = {
|
||||||
'list': ['name', 'rating', 'slug', 'category', 'variants'],
|
'list': ['id','name', 'rating', 'slug', 'category', 'variants'],
|
||||||
'instance': ['name', 'description', 'rating', 'slug', 'meta_description', 'meta_keywords', 'meta_rating', 'category', 'related_products', 'in_pack_items', 'variants'],
|
'instance': ['id', 'name', 'description', 'rating', 'slug', 'meta_description', 'meta_keywords', 'meta_rating', 'category', 'related_products', 'in_pack_items', 'variants'],
|
||||||
'chat': ['name', 'description', 'variants']
|
'chat': ['id', 'name', 'description', 'variants']
|
||||||
}
|
}
|
||||||
|
|
||||||
def get_variants(self, obj):
|
def get_variants(self, obj):
|
||||||
|
|||||||
Reference in New Issue
Block a user