summaryrefslogtreecommitdiff
path: root/indoteknik_api/controllers/api_v1
diff options
context:
space:
mode:
authorRafi Zadanly <zadanlyr@gmail.com>2023-01-31 16:18:31 +0700
committerRafi Zadanly <zadanlyr@gmail.com>2023-01-31 16:18:31 +0700
commitcf289c9d54691a451937595e9695d02cf894cbb5 (patch)
treeab3f98f19e9990824aa3f06334c7524f46eb104b /indoteknik_api/controllers/api_v1
parentc9ea2dc29a955fe34dfc8046e958ff7bc0c65632 (diff)
categories_homepage image
Diffstat (limited to 'indoteknik_api/controllers/api_v1')
-rw-r--r--indoteknik_api/controllers/api_v1/category.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/indoteknik_api/controllers/api_v1/category.py b/indoteknik_api/controllers/api_v1/category.py
index b7ea65ed..3a83f6a1 100644
--- a/indoteknik_api/controllers/api_v1/category.py
+++ b/indoteknik_api/controllers/api_v1/category.py
@@ -82,7 +82,7 @@ class Category(controller.Controller):
'sequence': category.sequence,
'category_id': category.category_id.id,
'name': category.category_id.name,
- 'image': base_url + 'api/image/website.categories.homepage/image/' + str(category.id) if category.image else '',
+ 'image': request.env['ir.attachment'].api_image('website.categories.homepage', 'image', category.id),
'url': category.url,
# 'brands': [y.x_name for y in brands],
'brands': [request.env['x_manufactures'].api_single_response(y) for y in brands],