瀏覽代碼

设备编号调整设置为固定数据格式

yf_fyh 3 年之前
父節點
當前提交
9ca4bfa157
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      apps/PestAnalysis/views.py

+ 1 - 1
apps/PestAnalysis/views.py

@@ -138,7 +138,7 @@ class PestSelectView(GenericAPIView):
                     indentify_photo = indentify_path + "/" + photo_object["indentify_photo"]
             else:
                 indentify_photo = ""
-            pest_image_data.append({"deviceId":d_id_dicts.get(d_id,{"device_id":d_id})["device_id"],
+            pest_image_data.append({"deviceId":str(d_id_dicts.get(d_id,{"device_id":d_id})["device_id"]),
                                     "deviceName":d_id_dicts.get(d_id,{"device_name":"测报灯"})["device_name"],
                                     "pestName":pest_string,
                                     "addtime":addtime,