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
62d1aea4
Commit
62d1aea4
authored
Jul 15, 2019
by
王浩
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'haow/dev' into 'test'
fix code See merge request
!242
parents
3437eb2b
606bcbb4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
brand.py
api/brand.py
+2
-2
No files found.
api/brand.py
View file @
62d1aea4
...
...
@@ -55,10 +55,10 @@ class BrandInfoView(APIView):
data
=
self
.
rpc
[
'neptune/commodity/brand/info'
](
id_
=
id_
)
.
unwrap
()
classify_infos
=
self
.
rpc
[
'neptune/commodity/classify/infos'
](
brand_id
=
id_
)
.
unwrap
()
data
[
'classify_infos'
]
=
[{
'id'
:
obj
.
get
(
'id'
),
'cn_name'
:
obj
.
get
(
'cn_name'
)}
for
obj
in
classify_infos
]
data
[
'classify_infos'
]
=
[{
'id'
:
obj
.
get
(
'id'
),
'cn_name'
:
obj
.
get
(
'cn_name'
)}
for
obj
in
classify_infos
]
if
classify_infos
else
[]
category_ids
=
self
.
rpc
[
'neptune/commodity/brand/category_ids'
](
id_
=
id_
)
.
unwrap
()
category_infos
=
self
.
rpc
[
'neptune/commodity/category/infos'
](
ids
=
category_ids
)
.
unwrap
()
data
[
'category_infos'
]
=
[{
'id'
:
obj
.
get
(
'id'
),
'cn_name'
:
obj
.
get
(
'cn_name'
)}
for
obj
in
category_infos
]
data
[
'category_infos'
]
=
[{
'id'
:
obj
.
get
(
'id'
),
'cn_name'
:
obj
.
get
(
'cn_name'
)}
for
obj
in
category_infos
]
if
category_infos
else
[]
return
data
...
...
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