We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 3767536 + 688c3a9 commit b8a661aCopy full SHA for b8a661a
graphene_django_extras/paginations/utils.py
@@ -2,7 +2,7 @@
2
from functools import partial
3
4
import graphene
5
-from django.core.exceptions import ValidationError
+from django.db import DatabaseError
6
7
from ..base_types import DjangoListObjectBase
8
@@ -72,5 +72,5 @@ def _get_count(queryset):
72
"""
73
try:
74
return queryset.count()
75
- except (AttributeError, TypeError):
+ except (AttributeError, TypeError, DatabaseError):
76
return len(queryset)
0 commit comments