:art: Opt commands membercard

Kimi.Huang 5 年之前
父节点
当前提交
6bb8ebcc79
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      commands/management/commands/membercard.py

+ 4 - 0
commands/management/commands/membercard.py

@@ -57,6 +57,10 @@ class Command(CompatibilityBaseCommand):
57 57
 
58 58
             logger.info(userinfo)
59 59
 
60
+            userinfo = userinfo.get('user_info', {})
61
+            if not userinfo:
62
+                continue
63
+
60 64
             common_field_list = userinfo.get('common_field_list', [])
61 65
             phone = get_phone(common_field_list)
62 66