5af4cabd by 周伟奇

fix ip

1 parent 0677013d
......@@ -29,7 +29,7 @@ class LoginView(ObtainJSONWebToken, GenericView):
remote_ip = request.META.get('HTTP_X_REAL_IP', '')
user_name = request.data.get('username', '')
times = rh.get_login_times(remote_ip)
if isinstance(times, int) and times >= LOGIN_TIMES_LIMIT:
if isinstance(times, str) and int(times) >= LOGIN_TIMES_LIMIT:
raise self.invalid_params(msg="重试次数限制")
res = super(LoginView, self).post(request, *args, **kwargs)
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!