Skip to content

Commit

Permalink
Merge pull request #98 from drchrono/master
Browse files Browse the repository at this point in the history
Catch DatabaseError in _get_count
  • Loading branch information
eamigo86 authored Jan 4, 2019
2 parents 3767536 + 688c3a9 commit b8a661a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions graphene_django_extras/paginations/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from functools import partial

import graphene
from django.core.exceptions import ValidationError
from django.db import DatabaseError

from ..base_types import DjangoListObjectBase

Expand Down Expand Up @@ -72,5 +72,5 @@ def _get_count(queryset):
"""
try:
return queryset.count()
except (AttributeError, TypeError):
except (AttributeError, TypeError, DatabaseError):
return len(queryset)

0 comments on commit b8a661a

Please sign in to comment.