Improve query time by removing a check from the order by filter handler

This commit is contained in:
Matthew Jones
2014-11-21 15:57:01 -05:00
parent 226c31bc35
commit 2916ebf0c0
2 changed files with 3 additions and 6 deletions

View File

@@ -15,6 +15,7 @@ import sys
from django.conf import settings
from django.contrib.auth.models import User
from django.core.urlresolvers import reverse
from django.core.exceptions import FieldError
from django.db.models import Q, Count, Sum
from django.db import IntegrityError, transaction
from django.shortcuts import get_object_or_404
@@ -62,6 +63,8 @@ def api_exception_handler(exc):
'''
if isinstance(exc, IntegrityError):
exc = ParseError(exc.args[0])
if isinstance(exc, FieldError):
exc = ParseError(exc.args[0])
return exception_handler(exc)