Commit cd513711 authored by haowang's avatar haowang

fix code

parent 00a87055
...@@ -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('brandId'), 'id': item.get('origin_brand_id'),
'cn_name': item.get('displayName'), 'cn_name': item.get('cn_name'),
'en_name': item.get('aliasName'), 'en_name': item.get('en_name'),
'icon': item.get('imgPath'), 'icon': item.get('icon'),
'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()
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