Fixed crash on missing title field
This commit is contained in:
parent
1e491ba8d3
commit
d058886d6c
@ -30,7 +30,7 @@ class UploadView(FlaskView):
|
|||||||
|
|
||||||
@login_required
|
@login_required
|
||||||
def post(self):
|
def post(self):
|
||||||
title = request.form.get('title')
|
title = request.form.get('title', '')
|
||||||
title = title[:Item.name.property.columns[0].type.length]
|
title = title[:Item.name.property.columns[0].type.length]
|
||||||
title = bleach.clean(title, tags=[])
|
title = bleach.clean(title, tags=[])
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user