Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
saturn
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
saturn
Commits
cd513711
Commit
cd513711
authored
Jun 27, 2019
by
haowang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix code
parent
00a87055
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
6 deletions
+4
-6
product.py
api/views/product.py
+4
-6
No files found.
api/views/product.py
View file @
cd513711
...
@@ -47,7 +47,6 @@ class ProductBatchCreate(BaseView):
...
@@ -47,7 +47,6 @@ class ProductBatchCreate(BaseView):
self
.
add_parallel_rpc_call_info
(
'create_brand'
,
'neptune/commodity/brand/create'
,
self
.
add_parallel_rpc_call_info
(
'create_brand'
,
'neptune/commodity/brand/create'
,
cn_name
=
brand_info
.
get
(
'cnName'
),
icon
=
brand_info
.
get
(
'imgSrc'
),
cn_name
=
brand_info
.
get
(
'cnName'
),
icon
=
brand_info
.
get
(
'imgSrc'
),
description
=
brand_info
.
get
(
'description'
),
en_name
=
brand_info
.
get
(
'en_name'
),
description
=
brand_info
.
get
(
'description'
),
en_name
=
brand_info
.
get
(
'en_name'
),
origin_brand_id
=
brand_info
.
get
(
'id'
),
platform
=
PRODUCT_FLATFORM
.
BEVOL
,
product_id
=
product_id
)
origin_brand_id
=
brand_info
.
get
(
'id'
),
platform
=
PRODUCT_FLATFORM
.
BEVOL
,
product_id
=
product_id
)
if
composition_infos
:
if
composition_infos
:
self
.
add_parallel_rpc_call_info
(
'batch_create_composition'
,
'neptune/commodity/composition/batch_create'
,
self
.
add_parallel_rpc_call_info
(
'batch_create_composition'
,
'neptune/commodity/composition/batch_create'
,
...
@@ -108,10 +107,10 @@ class BrandBatchCreate(BaseView):
...
@@ -108,10 +107,10 @@ class BrandBatchCreate(BaseView):
if
not
brand_infos
:
if
not
brand_infos
:
return
self
.
error
(
self
.
get_ErrorInfo
(
ERROR
.
PARAMS_INCOMPLETE
))
return
self
.
error
(
self
.
get_ErrorInfo
(
ERROR
.
PARAMS_INCOMPLETE
))
infos
=
[{
infos
=
[{
'id'
:
item
.
get
(
'
brandI
d'
),
'id'
:
item
.
get
(
'
origin_brand_i
d'
),
'cn_name'
:
item
.
get
(
'
displayN
ame'
),
'cn_name'
:
item
.
get
(
'
cn_n
ame'
),
'en_name'
:
item
.
get
(
'
aliasN
ame'
),
'en_name'
:
item
.
get
(
'
en_n
ame'
),
'icon'
:
item
.
get
(
'i
mgPath
'
),
'icon'
:
item
.
get
(
'i
con
'
),
'description'
:
item
.
get
(
'description'
)
'description'
:
item
.
get
(
'description'
)
}
for
item
in
brand_infos
]
}
for
item
in
brand_infos
]
error
,
_
=
self
.
call_rpc
(
'neptune/commodity/brand/batch_create'
,
error
,
_
=
self
.
call_rpc
(
'neptune/commodity/brand/batch_create'
,
...
@@ -120,4 +119,3 @@ class BrandBatchCreate(BaseView):
...
@@ -120,4 +119,3 @@ class BrandBatchCreate(BaseView):
return
self
.
error
(
error
)
return
self
.
error
(
error
)
return
self
.
ok
()
return
self
.
ok
()
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