diff --git a/unifier/views.py b/unifier/views.py index a37a4c0ff729c2ac750c687e1c60efc2a44eee3d..612c1d22c300268c815a73574498006f214b18ef 100644 --- a/unifier/views.py +++ b/unifier/views.py @@ -235,6 +235,8 @@ def get_unified_frames(request): else: unified_frames = UnifiedFrame.objects + records_total = unified_frames.count() + if order_field is not None: unified_frames = unified_frames.order_by(order_field) @@ -274,12 +276,14 @@ def get_unified_frames(request): value['status'] == choices.UnifiedFrameStatus.VERIFIED: res_processed.append(value) + records_filtered = len(res_processed) + res_processed = res_processed[first_index:last_index] ret = { 'draw': scroller_params['draw'], - 'recordsTotal': len(res_processed), - 'recordsFiltered': len(res_processed), + 'recordsTotal': records_total, + 'recordsFiltered': records_filtered, 'data': res_processed }