Skip to content
This repository has been archived by the owner on May 27, 2019. It is now read-only.

Commit

Permalink
fixed ugettext_lazy issue
Browse files Browse the repository at this point in the history
  • Loading branch information
tleguijt committed Aug 31, 2016
1 parent 394a97d commit bf9f088
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions wagtailsocialfeed/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import json

from django.http import JsonResponse
from django.utils import six
from django.utils.translation import ugettext_lazy as _
from django.views.decorators.csrf import csrf_exempt
from django.views.generic.base import View
Expand Down Expand Up @@ -74,7 +75,7 @@ def post(self, request, pk, post_id):
config = SocialFeedConfiguration.objects.get(pk=pk)

if 'original' not in request.POST:
err = {'message': error_messages['no_original']}
err = {'message': six.text_type(error_messages['no_original'])}
return JsonResponse(err, status=400)

original = request.POST['original']
Expand All @@ -98,7 +99,7 @@ def post(self, request, pk, post_id):
try:
item = config.moderated_items.get(external_id=post_id)
except ModeratedItem.DoesNotExist:
err = {'message': error_messages['not_found']}
err = {'message': six.text_type(error_messages['not_found'])}
return JsonResponse(err, status=404)

item.delete()
Expand Down

0 comments on commit bf9f088

Please sign in to comment.