Browse Source

fix:count bug

chenjunkai 6 years ago
parent
commit
2fc58601fa
1 changed files with 1 additions and 1 deletions
  1. 1 1
      Controller/AdminManage.py

+ 1 - 1
Controller/AdminManage.py

@@ -149,7 +149,7 @@ class AdminManage(TemplateView):
         # 权限固定为30
         own_perm = ModelService.check_perm(userID, 30)
         if own_perm:
-            count = int(Device_Info.objects.count())
+            count = int(Device_Info.objects.all().count())
             redisObj = RedisObject(db=3)
             onlines = int(redisObj.get_size())
             return response.json(0, {"onlinenum": onlines, "no_onlinenum": count - onlines})