You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by ma...@apache.org on 2021/06/23 19:38:59 UTC
[airavata-django-portal] 02/02: AIRAVATA-3322 Fix Pager display for
results that don't return counts
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 0590d3ba289b8bd131bfb2bde1690be270bd6d31
Author: Marcus Christie <ma...@apache.org>
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;
}