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
|
# news command
|
||||||
def add_news(self, data: Dict[str, Any] = None) -> None:
|
def add_news(self, data: Dict[str, Any] = None) -> None:
|
||||||
if data is None:
|
if data is None:
|
||||||
news: Dict[str, str] = {}
|
data: Dict[str, str] = {}
|
||||||
news["title"] = {}
|
data["title"] = {}
|
||||||
news["content"] = {}
|
data["content"] = {}
|
||||||
|
|
||||||
data["id"] = self.log.input("News ID")
|
data["id"] = self.log.input("News ID")
|
||||||
|
|
||||||
|
@ -86,7 +86,7 @@
|
|||||||
<span>
|
<span>
|
||||||
{$_("home.projects.desc")}:
|
{$_("home.projects.desc")}:
|
||||||
</span>
|
</span>
|
||||||
{#if data.error === undefined}
|
{#if data.error.length === 0}
|
||||||
<ul>
|
<ul>
|
||||||
{#each data.projects.filter((p) => {
|
{#each data.projects.filter((p) => {
|
||||||
return p.desc[$locale] !== "" && p.desc[$locale] !== null && p.desc[$locale] !== undefined;
|
return p.desc[$locale] !== "" && p.desc[$locale] !== null && p.desc[$locale] !== undefined;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user