Skip to content

Commit

Permalink
default to 0 not None
Browse files Browse the repository at this point in the history
  • Loading branch information
bmartel committed Nov 29, 2024
1 parent ab80a7c commit 67ea321
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions label_studio/data_manager/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,8 +230,8 @@ def paginate_totals_queryset(self, queryset, request, view=None):
total_annotations=Sum('total_annotations') - Sum('cancelled_annotations'),
total_predictions=Sum('total_predictions'),
)
self.total_annotations = totals['total_annotations']
self.total_predictions = totals['total_predictions']
self.total_annotations = totals.get('total_annotations', 0)
self.total_predictions = totals.get('total_predictions', 0)
return super().paginate_queryset(queryset, request, view)

def paginate_queryset(self, queryset, request, view=None):
Expand Down

0 comments on commit 67ea321

Please sign in to comment.