Skip to content

Commit

Permalink
feat(repositories): move sorting out of repository class
Browse files Browse the repository at this point in the history
  • Loading branch information
RobertRosca committed Sep 24, 2024
1 parent 5a41f83 commit 596bd58
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% for client in clients %}
{% for client in clients | sort(attribute='created_at', reverse=True) %}
<tr class="hover" key="{{ client.token.get_secret_value() }}">
<td>
{{ client.proposal_no }}
Expand Down
4 changes: 0 additions & 4 deletions src/zulip_write_only_proxy/repositories.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,6 @@ async def load(self):
for item in orjson.loads(await APath(self.file).read_bytes())
]

self._data = sorted(
self._data, key=lambda item: item.created_at, reverse=True
)

self.data = {item._key: item for item in self._data}

async def write(self):
Expand Down

0 comments on commit 596bd58

Please sign in to comment.