Merge "Fix bug about snapshot pagination"
This commit is contained in:
commit
485dae11d9
|
@ -296,6 +296,9 @@ def update_pagination(entities, page_size, marker, sort_dir):
|
|||
elif marker is not None:
|
||||
has_prev_data = True
|
||||
|
||||
if sort_dir == 'asc':
|
||||
entities.reverse()
|
||||
|
||||
return entities, has_more_data, has_prev_data
|
||||
|
||||
|
||||
|
|
|
@ -75,8 +75,7 @@ class SnapshotsView(tables.PagedTableMixin, tables.DataTableView):
|
|||
|
||||
else:
|
||||
snapshots = []
|
||||
return sorted(snapshots,
|
||||
key=lambda snapshot: snapshot.tenant_name or '')
|
||||
return snapshots
|
||||
|
||||
|
||||
class UpdateStatusView(forms.ModalFormView):
|
||||
|
|
|
@ -62,10 +62,6 @@ class VolumeTableMixIn(object):
|
|||
cinder.volume_list_paged(self.request, marker=marker,
|
||||
search_opts=search_opts,
|
||||
sort_dir=sort_dir, paginate=True)
|
||||
|
||||
if sort_dir == "asc":
|
||||
volumes.reverse()
|
||||
|
||||
return volumes
|
||||
except Exception:
|
||||
exceptions.handle(self.request,
|
||||
|
|
Loading…
Reference in New Issue