fix add_news command in admin.py
Signed-off-by: ngn <ngn@ngn.tf>
This commit is contained in:
parent
1c99aee43d
commit
392b554eb9
@ -336,9 +336,9 @@ class AdminScript:
|
||||
# news command
|
||||
def add_news(self, data: Dict[str, Any] = None) -> None:
|
||||
if data is None:
|
||||
news: Dict[str, str] = {}
|
||||
news["title"] = {}
|
||||
news["content"] = {}
|
||||
data: Dict[str, str] = {}
|
||||
data["title"] = {}
|
||||
data["content"] = {}
|
||||
|
||||
data["id"] = self.log.input("News ID")
|
||||
|
||||
|
@ -86,7 +86,7 @@
|
||||
<span>
|
||||
{$_("home.projects.desc")}:
|
||||
</span>
|
||||
{#if data.error === undefined}
|
||||
{#if data.error.length === 0}
|
||||
<ul>
|
||||
{#each data.projects.filter((p) => {
|
||||
return p.desc[$locale] !== "" && p.desc[$locale] !== null && p.desc[$locale] !== undefined;
|
||||
|
Loading…
x
Reference in New Issue
Block a user