mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
dev: add sorting
This commit is contained in:
parent
f760836a90
commit
4341bce9a8
@ -340,6 +340,11 @@ class GroupedOffsetPaginator(OffsetPaginator):
|
||||
group_value = str(result.get(self.group_by_field_name))
|
||||
if group_value in processed_results:
|
||||
processed_results[str(group_value)]["results"].append(result)
|
||||
|
||||
for group_value, data in processed_results.items():
|
||||
data["results"].sort(
|
||||
key=lambda x: x.get("created_at"), reverse=True
|
||||
)
|
||||
return processed_results
|
||||
|
||||
def process_results(self, results):
|
||||
|
Loading…
Reference in New Issue
Block a user