Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Postal Owl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
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
Jiří Kalvoda
Postal Owl
Commits
d909f1e7
Commit
d909f1e7
authored
1 year ago
by
Martin Mareš
Browse files
Options
Downloads
Patches
Plain Diff
Do not crash when trying to determine author roles in discussion topics
parent
c7a8370f
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
owl/post.py
+1
-1
1 addition, 1 deletion
owl/post.py
with
1 addition
and
1 deletion
owl/post.py
+
1
−
1
View file @
d909f1e7
...
...
@@ -208,7 +208,7 @@ def topic_post(form, student_uid) -> Optional[db.Post]:
if
comment
or
attach
or
points
is
not
None
:
if
g
.
is_teacher
:
role
=
db
.
PostRole
.
teacher
elif
g
.
uid
==
student_uid
:
elif
g
.
uid
==
student_uid
or
g
.
topic
.
type
==
'
D
'
:
role
=
db
.
PostRole
.
student
elif
g
.
is_grader
:
role
=
db
.
PostRole
.
grader
...
...
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
register
or
sign in
to comment