feat: Order supa repo results reverse chronologically

This commit is contained in:
Marty Oehme 2025-06-09 22:16:00 +02:00
parent 3948b9060c
commit 84ea46f142
Signed by: Marty
GPG key ID: 4E535BC19C61886E

View file

@ -52,7 +52,11 @@ class ImprovementSupaRepo(IImprovementRepo):
def get_all(self) -> list[Improvement]:
return [
self._from_tbl_row(row)
for row in self.client.table(self.config.TABLE).select("*").execute().data
for row in self.client.table(self.config.TABLE)
.select("*")
.order("date_orig_ts", desc=True)
.execute()
.data
]
def _to_tbl_row(self, imp: Improvement) -> dict[str, str | int]: