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
18b69668
Commit
18b69668
authored
Jul 04, 2019
by
王浩
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'haow/dev' into 'test'
fix code about batch create product api See merge request
!72
parents
d168d0e3
329818fc
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
6 deletions
+3
-6
product.py
api/views/product.py
+3
-6
No files found.
api/views/product.py
View file @
18b69668
...
...
@@ -67,34 +67,31 @@ class ProductBatchCreate(BaseView):
if
brand_info
:
error
,
_
=
self
.
parallel_rpc_call_result
[
'create_brand'
]
if
error
:
print
(
'create_brand'
)
return
error
,
None
if
composition_infos
:
error
,
_
=
self
.
parallel_rpc_call_result
[
'batch_create_composition'
]
if
error
:
print
(
'batch_create_composition'
)
return
error
,
None
if
category_info
:
error
,
_
=
self
.
parallel_rpc_call_result
[
'create_category'
]
if
error
:
print
(
'create_category'
)
return
error
,
None
if
effect_info
:
error
,
_
=
self
.
parallel_rpc_call_result
[
'create_effect'
]
if
error
:
print
(
'create_effect'
,
effect_info
)
return
error
,
None
return
None
,
result
def
create_product
(
self
,
product_info
):
error
,
ret
=
self
.
call_rpc
(
'neptune/commodity/product/create'
,
cn_name
=
product_info
.
get
(
'cn_name'
),
norms
=
product_info
.
get
(
'norms'
),
cn_name
=
product_info
.
get
(
'cn_name'
),
en_name
=
product_info
.
get
(
'en_name'
),
image
=
product_info
.
get
(
'image'
),
norms
=
product_info
.
get
(
'norms'
),
grade
=
product_info
.
get
(
'grade'
),
price
=
product_info
.
get
(
'price'
),
en_name
=
product_info
.
get
(
'en_name'
),
country
=
product_info
.
get
(
'country'
),
country
=
product_info
.
get
(
'country'
),
comment_nums
=
product_info
.
get
(
'comment_nums'
),
origin_product_id
=
product_info
.
get
(
'id'
),
platform
=
PRODUCT_FLATFORM
.
BEVOL
)
return
error
,
ret
...
...
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