Fixed multiple problems related to migration to django-preferences.

This commit is contained in:
2018-12-29 23:16:04 +02:00
parent 10fced57e1
commit 2c93e50406
12 changed files with 77 additions and 40 deletions

View File

@ -39,8 +39,8 @@ class ModalMixin(ContextMixin):
result = {'success': success}
if not success:
result['errors'] = form.errors.get_json_data(escape_html=True)
if error_msg is not None:
result['errors']['__all__'] = [{'message': error_msg}]
if error_msg is not None:
result['errors']['__all__'] = [{'message': error_msg}]
return JsonResponse(result)