Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Odevzdávací Systém MO
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
MO-P
Odevzdávací Systém MO
Commits
a3133d54
Project 'mj/mo-submit' was moved to 'mo-p/osmo'. Please update any links and bookmarks that may still have the old path.
Commit
a3133d54
authored
Aug 23, 2022
by
Martin Mareš
Browse files
Options
Downloads
Patches
Plain Diff
Drobné opravy typování
parent
84e8713b
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
mo/imports.py
+1
-1
1 addition, 1 deletion
mo/imports.py
mo/users.py
+1
-1
1 addition, 1 deletion
mo/users.py
mo/web/acct.py
+1
-1
1 addition, 1 deletion
mo/web/acct.py
with
3 additions
and
3 deletions
mo/imports.py
+
1
−
1
View file @
a3133d54
...
...
@@ -261,7 +261,7 @@ class Import:
return
contest
def
add_role
(
self
,
user
:
db
.
User
,
role
:
db
.
RoleType
,
place
:
Optional
[
db
.
Place
]
,
year
:
Optional
[
int
],
category
:
Optional
[
str
],
round
:
Optional
[
db
.
Round
]):
def
add_role
(
self
,
user
:
db
.
User
,
role
:
db
.
RoleType
,
place
:
db
.
Place
,
year
:
Optional
[
int
],
category
:
Optional
[
str
],
round
:
Optional
[
db
.
Round
]):
sess
=
db
.
get_session
()
if
year
and
round
and
round
.
year
!=
year
:
...
...
...
...
This diff is collapsed.
Click to expand it.
mo/users.py
+
1
−
1
View file @
a3133d54
...
...
@@ -201,7 +201,7 @@ def user_by_email(email: str) -> Optional[db.User]:
return
db
.
get_session
().
query
(
db
.
User
).
filter_by
(
email
=
email
).
first
()
def
user_by_uid
(
uid
:
int
)
->
db
.
User
:
def
user_by_uid
(
uid
:
int
)
->
Optional
[
db
.
User
]
:
return
db
.
get_session
().
query
(
db
.
User
).
get
(
uid
)
...
...
...
...
This diff is collapsed.
Click to expand it.
mo/web/acct.py
+
1
−
1
View file @
a3133d54
...
...
@@ -346,7 +346,7 @@ class Reg1:
app
.
logger
.
info
(
'
Reg1: Captcha token použit znovu
'
)
return
False
rr
=
mo
.
users
.
new_reg_request
(
db
.
RegReqType
.
register
,
request
.
remote_addr
)
rr
=
mo
.
users
.
new_reg_request
(
db
.
RegReqType
.
register
,
mo
.
util
.
assert_not_none
(
request
.
remote_addr
)
)
if
not
rr
:
self
.
_reset
()
self
.
status
=
RegStatus
.
rate_limited
...
...
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
sign in
to comment