Fixed a bug on the website that caused the category to get lost on
preview.
This commit is contained in:
parent
5edebdabd0
commit
7487946a78
1 changed files with 1 additions and 1 deletions
|
|
@ -23,12 +23,12 @@ def new():
|
|||
if rv is not None:
|
||||
category_id = rv.id
|
||||
if request.method == 'POST':
|
||||
category_id = request.form.get('category', type=int)
|
||||
if 'preview' in request.form:
|
||||
preview = format_creole(request.form['body'])
|
||||
else:
|
||||
title = request.form['title']
|
||||
body = request.form['body']
|
||||
category_id = request.form.get('category', type=int)
|
||||
if not body:
|
||||
flash(u'Error: you have to enter a snippet')
|
||||
else:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue