dever 7 年之前
父节点
当前提交
1e63a2233d
共有 2 个文件被更改,包括 2 次插入2 次删除
  1. 1 1
      front/api/device.py
  2. 1 1
      front/api/origin.py

+ 1 - 1
front/api/device.py

@@ -73,7 +73,7 @@ class index_path(Load):
 					type = self.service('common').one('device_type', id=value['type_id'])
 					self.data['device'][key]['unit'] = type['unit']
 
-			self.data['pic'] = {}
+			self.data['pic'] = []
 			pic = self.service('common').list('device_info', state=True, search={'hardware_type':6, 'gateway_id':id})
 			if pic:
 				for key, value in enumerate(pic):

+ 1 - 1
front/api/origin.py

@@ -166,7 +166,7 @@ class info_path(Load):
 			if self.data['info']:
 				self.data['info'] = Origin.get(self, self.data['info'])
 			
-			self.data['pic'] = {}
+			self.data['pic'] = []
 			pic = self.service('common').list('device_info', state=True, search={'hardware_type':6, 'gateway_id':self.data['gateway_id']})
 			if pic:
 				for key, value in enumerate(pic):