浏览代码

修改UID上传

chenshibin 4 年之前
父节点
当前提交
9dedfc1595
共有 1 个文件被更改,包括 4 次插入1 次删除
  1. 4 1
      Controller/VPGController.py

+ 4 - 1
Controller/VPGController.py

@@ -217,6 +217,9 @@ def do_upload_uid(request):
     if (not MAC['is_active']) or (current_mac[-8:] == 'FF.FF.FF'):
         return response.json(175)
 
+    area = 0
+    if vpg_id != 1:
+        area = 1
     # path = '/'.join((BASE_DIR, 'static/uid')).replace('\\', '/') + '/'
     # if not os.path.exists(path):
     #     os.makedirs(path)
@@ -237,7 +240,7 @@ def do_upload_uid(request):
                     status=0,
                     add_time=add_time,
                     update_time=update_time,
-                    area=0,  # 关联vgp表已有区域信息,可以考虑去掉
+                    area=area,  # 关联vgp表已有区域信息,可以考虑去掉
                     vpg_id=vpg_id,
                 )
                 if len(uid) == 14:  # 宸云