Skip to content

Commit b8a661a

Browse files
authored
Merge pull request #98 from drchrono/master
Catch DatabaseError in _get_count
2 parents 3767536 + 688c3a9 commit b8a661a

File tree

1 file changed

+2
-2
lines changed
  • graphene_django_extras/paginations

1 file changed

+2
-2
lines changed

graphene_django_extras/paginations/utils.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
from functools import partial
33

44
import graphene
5-
from django.core.exceptions import ValidationError
5+
from django.db import DatabaseError
66

77
from ..base_types import DjangoListObjectBase
88

@@ -72,5 +72,5 @@ def _get_count(queryset):
7272
"""
7373
try:
7474
return queryset.count()
75-
except (AttributeError, TypeError):
75+
except (AttributeError, TypeError, DatabaseError):
7676
return len(queryset)

0 commit comments

Comments
 (0)