:bug: Fix Bug: 'UserInfo' object has no attribute 'brand_id'

huangqimin 5 years ago
parent
commit
0ff41d0c14
2 changed files with 3 additions and 2 deletions
  1. 1 1
      account/models.py
  2. 2 1
      commands/management/commands/membercard.py

+ 1 - 1
account/models.py

@@ -494,7 +494,7 @@ class UserInfo(BaseModelMixin, LensmanTypeBoolMixin):
494 494
     @property
495 495
     def cardata(self):
496 496
         return {
497
-            'brand_id': self.brand_id,
497
+            # 'brand_id': self.brand_id,
498 498
             'card_id': self.membercardid,
499 499
             'code': self.memberusercardcode,
500 500
         }

+ 2 - 1
commands/management/commands/membercard.py

@@ -49,7 +49,8 @@ class Command(CompatibilityBaseCommand):
49 49
             if not (card_id and code):
50 50
                 continue
51 51
 
52
-            wxcfg = WECHAT.get('{}:JSAPI'.format(brand_id), {})
52
+            # wxcfg = WECHAT.get('{}:JSAPI'.format(brand_id), {})
53
+            wxcfg = WECHAT.get('JSAPI', {})
53 54
 
54 55
             appid = wxcfg.get('appID')
55 56
             secret = wxcfg.get('appsecret')