forum: properly redirect topic after changing forum
The URL changes so using the referrer is not much of an option.
This commit is contained in:
parent
3551103c88
commit
b9abfcfde7
|
@ -79,7 +79,11 @@ def edit_post(postid):
|
|||
for a, file in attachments:
|
||||
a.set_file(file)
|
||||
|
||||
return redirect(referrer)
|
||||
# Determine topic URL now, in case forum was changed
|
||||
if isinstance(p, Topic):
|
||||
return redirect(url_for('forum_topic', f=p.forum, page=(p,1)))
|
||||
else:
|
||||
return redirect(referrer)
|
||||
|
||||
# Non-submitted form
|
||||
if isinstance(p, Comment):
|
||||
|
|
Loading…
Reference in New Issue