fix add_news command in admin.py
All checks were successful
Build the docker image for the API / build (push) Successful in 10s
Build the docker image for the frontend application / build (push) Successful in 27s
Build the docker image for the doc server / build (push) Successful in 7s

Signed-off-by: ngn <ngn@ngn.tf>
This commit is contained in:
ngn 2025-01-20 09:38:31 +03:00
parent 1c99aee43d
commit 392b554eb9
Signed by: ngn
GPG Key ID: A3654DF5AD9F641D
2 changed files with 4 additions and 4 deletions

View File

@ -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")

View File

@ -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;