Ver código fonte

获取云存储主用户 修改返回值

chenshibin 4 anos atrás
pai
commit
812a608005
1 arquivos alterados com 9 adições e 0 exclusões
  1. 9 0
      Controller/EquipmentManagerV3.py

+ 9 - 0
Controller/EquipmentManagerV3.py

@@ -728,6 +728,15 @@ class EquipmentManagerV3(View):
         qs = {}
         if dvq.exists():
             qs = Device_User.objects.filter(userID=dvq[0]['vodPrimaryUserID']).values('userID', 'NickName', 'username', 'userEmail', 'phone')
+
+            if qs[0]['NickName'] =='':
+                qs[0]['NickName'] = qs[0]['username']
+
+            if qs[0]['userEmail'] =='':
+                qs[0]['userEmail'] = qs[0]['NickName']
+
+            if qs[0]['phone'] =='':
+                qs[0]['phone'] = qs[0]['NickName']
             qs = CommonService.qs_to_list(qs)
 
         # if not qs: