Fixed django-tastypie error based on https://github.com/toastdriven/django-tastypie/issues/1231