Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
周伟奇
/
bmw-ocr
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
5af4cabd
authored
2022-05-11 17:09:25 +0800
by
周伟奇
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix ip
1 parent
0677013d
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 additions
and
1 deletions
src/apps/account/views.py
src/apps/account/views.py
View file @
5af4cab
...
...
@@ -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
)
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment