Skip to content

Commit

Permalink
Remove unused row counter
Browse files Browse the repository at this point in the history
  • Loading branch information
guerler committed Dec 1, 2023
1 parent bab5d00 commit 550c354
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion client/src/components/Grid/configs/adminUsers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ async function getData(offset: number, limit: number, search: string, sort_by: s
};
const queryString = new URLSearchParams(query).toString();
const { data } = await axios.get(withPrefix(`/admin/users_list?${queryString}`));
return [data.rows, data.total_row_count];
return [data.rows, data.rows_total];
}

/**
Expand Down
5 changes: 2 additions & 3 deletions lib/galaxy/web/framework/helpers/grids.py
Original file line number Diff line number Diff line change
Expand Up @@ -1087,13 +1087,13 @@ def __call__(self, trans, **kwargs):
break

# Process limit and offset.
total_row_count = query.count()
rows_total = query.count()
query = query.limit(limit).offset(offset)

# Populate and return response
grid_config = {
"rows": [],
"total_rows": 0,
"rows_total": rows_total,
}
for row in query:
row_dict = {
Expand All @@ -1103,7 +1103,6 @@ def __call__(self, trans, **kwargs):
value = column.get_value(trans, self, row)
row_dict[column.key] = value
grid_config["rows"].append(row_dict)
grid_config["total_row_count"] = total_row_count
return grid_config

# ---- Override these ----------------------------------------------------
Expand Down

0 comments on commit 550c354

Please sign in to comment.