Fix Bug: should not login when not lensman/tourguide

Brightcells %!s(int64=8) %!d(string=hace) años
padre
commit
5a6012dac0
Se han modificado 2 ficheros con 2 adiciones y 2 borrados
  1. 1 1
      account/tourguide_views.py
  2. 1 1
      group/lensman_views.py

+ 1 - 1
account/tourguide_views.py

@@ -58,7 +58,7 @@ def tourguide_wx_authorize_api(request):
58 58
     city = request.POST.get('city', '')
59 59
 
60 60
     try:
61
-        user = UserInfo.objects.get(unionid=unionid)
61
+        user = UserInfo.objects.get(unionid=unionid, istourguide=True, status=True)
62 62
     except UserInfo.DoesNotExist:
63 63
         return response(TourGuideStatusCode.TOURGUIDE_NOT_FOUND)
64 64
 

+ 1 - 1
group/lensman_views.py

@@ -101,7 +101,7 @@ def lensman_wx_authorize_api(request):
101 101
     city = request.POST.get('city', '')
102 102
 
103 103
     try:
104
-        user = UserInfo.objects.get(unionid=unionid)
104
+        user = UserInfo.objects.get(unionid=unionid, islensman=True, status=True)
105 105
     except UserInfo.DoesNotExist:
106 106
         return response(LensmanStatusCode.LENSMAN_NOT_FOUND)
107 107