Fixed crash on missing title field
This commit is contained in:
@ -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=[])
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user