improve news and news manager

This commit is contained in:
David Rodenkirchen
2024-11-29 20:16:12 +01:00
parent 947a05ad14
commit a1fb68c976
3 changed files with 55 additions and 51 deletions
+2 -2
View File
@@ -63,7 +63,7 @@ class ManageNewsPage(Component):
self.news_posts = (await self.session[NewsService].get_news())[:8]
def build(self) -> Component:
posts = sorted([EditableNewsPost(
posts = [EditableNewsPost(
news_id=news.news_id,
title=news.title,
subtitle=news.subtitle,
@@ -72,7 +72,7 @@ class ManageNewsPage(Component):
author=news.author.user_name,
save_cb=self.on_news_post_changed,
delete_cb=self.on_news_post_deleted
) for news in self.news_posts], key=lambda p: p.date)
) for news in self.news_posts]
return Column(
MainViewContentBox(
Column(