rabin 8 роки тому
батько
коміт
37f796fab9
1 змінених файлів з 5 додано та 3 видалено
  1. 5 3
      front/page/__load__.py

+ 5 - 3
front/page/__load__.py

@@ -221,6 +221,8 @@ class Device(object):
 		for key, value in enumerate(self.data['group']):
 			if value['devices']:
 				search['id--ins'] = value['devices']
+				if self.data['device_cur'] == 'stat':
+					search['hardware_type--ins'].append(6)
 				self.data['group'][key]['device'] = Device.get(self, search=search)
 				if self.data['group'][key]['device']:
 					for k, v in enumerate(self.data['group'][key]['device']):
@@ -250,8 +252,8 @@ class Device(object):
 						if self.data['device_cur'] == 'stat':
 							if v['hardware_type'] == 6:
 								self.data['pic'] = True
-							elif v['type_id'] > 0:
-								self.data['device'].append(v) 
+							else:
+								self.data['device'].append(v)
 						else:
 							self.data['device'].append(v)
 
@@ -316,7 +318,7 @@ class Device(object):
 		self.data['statList'] = model.getData(method, search, self.data['deviceInfo'])
 	@staticmethod
 	def stat(self):
-		id, type = Device.init(self, search={'hardware_type--ins':(2,4,6)})
+		id, type = Device.init(self, search={'hardware_type--ins':[2,4]})
 		if not id:
 			return
 		Device.statBase(self, self.data['device'][0])