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
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
The Postal Owl
Postal Owl
Commits
d0922176
Commit
d0922176
authored
Feb 28, 2022
by
Martin Mareš
Browse files
Options
Downloads
Patches
Plain Diff
Fixed bug in creation of topics
parent
d4c6536a
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
owl.py
+6
-3
6 additions, 3 deletions
owl.py
with
6 additions
and
3 deletions
owl.py
+
6
−
3
View file @
d0922176
...
@@ -1175,11 +1175,14 @@ def admin_edit_topic(sident, cident, tid=None, copy_tid=None):
...
@@ -1175,11 +1175,14 @@ def admin_edit_topic(sident, cident, tid=None, copy_tid=None):
return
render_template
(
'
admin-edit-topic.html
'
,
form
=
form
,
tid
=
None
,
copy_tid
=
None
,
post_count
=
None
)
return
render_template
(
'
admin-edit-topic.html
'
,
form
=
form
,
tid
=
None
,
copy_tid
=
None
,
post_count
=
None
)
if
tid
is
None
:
if
tid
is
None
:
assert
form
.
copy_to
.
data
is
not
None
if
copy_tid
is
None
:
db_query
(
"
INSERT INTO owl_topics(cid, type) VALUES(%s,
'
H
'
) RETURNING *
"
,
(
form
.
copy_to
.
data
,))
cid
=
g
.
course
.
cid
else
:
cid
=
form
.
copy_to
.
data
assert
cid
is
not
None
db_query
(
"
INSERT INTO owl_topics(cid, type) VALUES(%s,
'
H
'
) RETURNING *
"
,
(
cid
,))
row
=
db
.
fetchone
()
row
=
db
.
fetchone
()
assert
row
assert
row
cid
=
row
.
cid
tid
=
row
.
tid
tid
=
row
.
tid
app
.
logger
.
info
(
f
"
Created topic: cid=
{
cid
}
tid=
{
tid
}
by_uid=
{
g
.
uid
}
"
)
app
.
logger
.
info
(
f
"
Created topic: cid=
{
cid
}
tid=
{
tid
}
by_uid=
{
g
.
uid
}
"
)
else
:
else
:
...
...
...
...
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