This is an automated email from the ASF dual-hosted git repository. machristie pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/airavata-django-portal.git
commit 6ee15c8e631a16b4d1dd844a8f89d69833f2e06e Author: Marcus Christie <[email protected]> AuthorDate: Wed Jun 23 15:37:19 2021 -0400 AIRAVATA-3322 Fix Pager display for results that don't return counts --- django_airavata/static/common/js/components/Pager.vue | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/django_airavata/static/common/js/components/Pager.vue b/django_airavata/static/common/js/components/Pager.vue index 69005e4..06c0316 100644 --- a/django_airavata/static/common/js/components/Pager.vue +++ b/django_airavata/static/common/js/components/Pager.vue @@ -42,13 +42,14 @@ export default { }, last: function () { if (this.paginator) { - if (this.paginator.hasOwnProperty("count")) { + if (this.paginator.count) { return Math.min( this.paginator.offset + this.paginator.limit, this.paginator.count ); + } else { + return this.paginator.offset + this.paginator.results.length; } - return this.paginator.offset + this.paginator.results.length; } else { return null; }
