Browse Source

更新 'main.py'

nemo0526 3 years ago
parent
commit
744bd573b9
1 changed files with 1 additions and 2 deletions
  1. 1 2
      main.py

+ 1 - 2
main.py

@@ -633,8 +633,7 @@ async def device(request: Request, Authorize: AuthJWT = Depends()):
     print("start")
     for row in db.query(statement):
         print(row['id'],row['deviceName'],row['hostIP'],row['CompanyCode'],row['FactoryCode'],row['DepartmentCode'])
-        a.append({row['id'],row['deviceName'],row['hostIP']})
-        a.append({row['CompanyCode'],row['FactoryCode'],row['DepartmentCode']})
+        a.append((row['id'],row['deviceName'],row['hostIP'],row['CompanyCode'],row['FactoryCode'],row['DepartmentCode']))
     print(a)
     print("over3")
     #result  = json.dumps(b,ensure_ascii=False)