fix error 500 when trying to edit/create an arealocation in editor

This commit is contained in:
Laura Klünder 2016-12-24 16:24:56 +01:00
parent 9ea9a72bb2
commit 62d4132d60
7 changed files with 21 additions and 18 deletions

View file

@ -131,7 +131,7 @@ def edit_mapitem(request, mapitem_type, name=None):
mapitem.titles[language] = title
if not settings.DIRECT_EDITING:
content = json_encode(mapitem.tofile())
content = json_encode(mapitem.tofile(form=form))
with translation.override('en'):
commit_msg = '%s %s: %s' % (commit_type, mapitemtype._meta.verbose_name, mapitem.title)
return render(request, 'editor/mapitem_success.html', {