Commit 9fced303 authored by haowang's avatar haowang

fix code

parent b35257f8
......@@ -35,7 +35,7 @@ class BrandListView(APIView):
category_dict[str(obj_id)] = [obj]
classify_infos = self.rpc['neptune/commodity/classify/infos'](brand_ids=brand_ids).unwrap()
classify_dict = {str(obj.get('brand_id')): obj for obj in classify_infos}
classify_dict = {str(obj.get('brand_id')): obj for obj in classify_infos} if classify_infos else {}
for obj in data:
brand_id = obj.get('id')
......
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