浏览代码

修改上传用户手机信息接口,兼容更新功能

tanghongbin 5 年之前
父节点
当前提交
d21ed94112
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      Controller/UserBrandControllerV2.py

+ 2 - 1
Controller/UserBrandControllerV2.py

@@ -51,7 +51,8 @@ class UserBrandV2(View):
         if userID and deviceSupplier and deviceModel:
         if userID and deviceSupplier and deviceModel:
             ub_qs = User_Brand.objects.filter(userID=userID)
             ub_qs = User_Brand.objects.filter(userID=userID)
             if ub_qs.exists():
             if ub_qs.exists():
-                return response.json(174)
+                ub_qs.update(deviceSupplier=deviceSupplier, deviceModel=deviceModel)
+                return response.json(0)
             else:
             else:
                 user = Device_User.objects.filter(userID=userID)
                 user = Device_User.objects.filter(userID=userID)
                 if not user.exists():
                 if not user.exists():