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:
|
if rv is not None:
|
||||||
category_id = rv.id
|
category_id = rv.id
|
||||||
if request.method == 'POST':
|
if request.method == 'POST':
|
||||||
|
category_id = request.form.get('category', type=int)
|
||||||
if 'preview' in request.form:
|
if 'preview' in request.form:
|
||||||
preview = format_creole(request.form['body'])
|
preview = format_creole(request.form['body'])
|
||||||
else:
|
else:
|
||||||
title = request.form['title']
|
title = request.form['title']
|
||||||
body = request.form['body']
|
body = request.form['body']
|
||||||
category_id = request.form.get('category', type=int)
|
|
||||||
if not body:
|
if not body:
|
||||||
flash(u'Error: you have to enter a snippet')
|
flash(u'Error: you have to enter a snippet')
|
||||||
else:
|
else:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue