Return instances by created order
Change-Id: I558c36b4f0894f8476ce7fc9c88c1829e8762011
This commit is contained in:
parent
d21d37d628
commit
69c8467854
@ -187,8 +187,11 @@ class InstancesView(object):
|
||||
|
||||
def data(self):
|
||||
data = []
|
||||
|
||||
# Return instances in the order of 'created'
|
||||
# These are model instances
|
||||
for instance in self.instances:
|
||||
for instance in sorted(self.instances, key=lambda ins: ins.created,
|
||||
reverse=True):
|
||||
data.append(self.data_for_instance(instance))
|
||||
return {'instances': data}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user