summaryrefslogtreecommitdiff
path: root/indoteknik_api/controllers/api_v1
diff options
context:
space:
mode:
authorstephanchrst <stephanchrst@gmail.com>2023-01-18 13:49:11 +0700
committerstephanchrst <stephanchrst@gmail.com>2023-01-18 13:49:11 +0700
commitf5eecb48f361dd0bc45c2d8b4cf12f34aea5f243 (patch)
tree3a0eb02fe92b35871137076a391278f96812606d /indoteknik_api/controllers/api_v1
parent65929f7a9c00639a7b1c360ebc9870b221aa5339 (diff)
add brand image in category homepage api
Diffstat (limited to 'indoteknik_api/controllers/api_v1')
-rw-r--r--indoteknik_api/controllers/api_v1/category.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/indoteknik_api/controllers/api_v1/category.py b/indoteknik_api/controllers/api_v1/category.py
index 36e67e01..62faff85 100644
--- a/indoteknik_api/controllers/api_v1/category.py
+++ b/indoteknik_api/controllers/api_v1/category.py
@@ -35,7 +35,8 @@ class Category(controller.Controller):
'name': category.category_id.name,
'image': base_url + 'api/image/website.categories.homepage/image/' + str(category.id) if category.image else '',
'url': category.url,
- 'brands': [y.x_name for y in brands],
+ # 'brands': [y.x_name for y in brands],
+ 'brands': [request.env['x_manufactures'].api_single_response(y) for y in brands],
'products': [request.env['product.template'].api_single_response(x) for x in products]
})
return self.response(data)