Commit 0a5effb7 authored by 王浩's avatar 王浩

Merge branch 'haow/dev' into 'test'

fix code

See merge request alpha/saturn!68
parents 2318b792 cd513711
......@@ -47,7 +47,6 @@ class ProductBatchCreate(BaseView):
self.add_parallel_rpc_call_info('create_brand', 'neptune/commodity/brand/create',
cn_name=brand_info.get('cnName'), icon=brand_info.get('imgSrc'),
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)
if composition_infos:
self.add_parallel_rpc_call_info('batch_create_composition', 'neptune/commodity/composition/batch_create',
......@@ -108,10 +107,10 @@ class BrandBatchCreate(BaseView):
if not brand_infos:
return self.error(self.get_ErrorInfo(ERROR.PARAMS_INCOMPLETE))
infos = [{
'id': item.get('brandId'),
'cn_name': item.get('displayName'),
'en_name': item.get('aliasName'),
'icon': item.get('imgPath'),
'id': item.get('origin_brand_id'),
'cn_name': item.get('cn_name'),
'en_name': item.get('en_name'),
'icon': item.get('icon'),
'description': item.get('description')
} for item in brand_infos]
error, _ = self.call_rpc('neptune/commodity/brand/batch_create',
......@@ -120,4 +119,3 @@ class BrandBatchCreate(BaseView):
return self.error(error)
return self.ok()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment