Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
sun
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
alpha
sun
Commits
1f66e433
Commit
1f66e433
authored
Jul 04, 2019
by
haowang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add info in product info api
parent
600e008f
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
+2
-0
product.py
api/product.py
+2
-0
No files found.
api/product.py
View file @
1f66e433
...
...
@@ -129,6 +129,8 @@ class ProductInfoView(APIView):
brand_info
=
self
.
rpc
[
'neptune/commodity/brand/infos'
](
product_id
=
id_
)
.
unwrap
()
data
[
'brand_name'
]
=
brand_info
[
0
]
.
get
(
'cn_name'
)
if
brand_info
else
''
classify_infos
=
self
.
rpc
[
'neptune/commodity/classify/infos'
](
product_ids
=
[
id_
])
.
unwrap
()
data
[
'classify_names'
]
=
[
obj
.
get
(
'cn_name'
)
for
obj
in
classify_infos
]
data
[
'category_names'
]
=
self
.
get_category_names
(
id_
)
data
[
'effect_names'
]
=
self
.
get_effect_names
(
id_
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment