Selaa lähdekoodia

report_push: sql参数错误处理

Signed-off-by: binren <zhangbr@elab-plus.com>
binren 5 vuotta sitten
vanhempi
commit
4802f96059
1 muutettua tiedostoa jossa 2 lisäystä ja 2 poistoa
  1. 2 2
      report_push.py

+ 2 - 2
report_push.py

@@ -421,7 +421,7 @@ class ReportPush(object):
     """
 
     def __init__(self, db_name):
-        self.db = MysqlDB(db_name)
+        self.db = MysqlDB(db_name, db_type=1)
 
     def report_data_query(self, task_key):
         """
@@ -465,7 +465,7 @@ class ReportPush(object):
                 else:
                     brands = [brand_ids]
                 for id in brands:
-                    house_ids.extend(self.get_house_ids_by_brand_id(id))
+                    house_ids.extend([x[0] for x in self.get_house_ids_by_brand_id(id)])
                 brand_id_list = brands
 
             result_data_1 = []