Skip to content

Commit

Permalink
Fix: Tags strings splitting
Browse files Browse the repository at this point in the history
  • Loading branch information
john681611 committed Oct 5, 2023
1 parent f7105bd commit 496e8fb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions application/database/db.py
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ def add_cre(self, dbcre: CRE):
"document_id": dbcre.id,
"description": dbcre.description,
"links": [], # dbcre.links,
"tags": dbcre.tags,
"tags": [dbcre.tags] if isinstance(dbcre.tags, str) else dbcre.tags,
}
)

Expand All @@ -344,7 +344,7 @@ def add_dbnode(self, dbnode: Node):
"doctype": dbnode.ntype,
"document_id": dbnode.id,
"description": dbnode.description or "",
"tags": dbnode.tags or [],
"tags": [dbnode.tags] if isinstance(dbnode.tags, str) else dbnode.tags,
"hyperlink": "", # dbnode.hyperlink or "",
"version": dbnode.version or "",
"section": dbnode.section or "",
Expand All @@ -361,7 +361,7 @@ def add_dbnode(self, dbnode: Node):
"document_id": dbnode.id,
"description": dbnode.description,
"links": [], # dbnode.links,
"tags": dbnode.tags,
"tags": [dbnode.tags] if isinstance(dbnode.tags, str) else dbnode.tags,
"metadata": "{}", # dbnode.metadata,
"hyperlink": "", # dbnode.hyperlink or "",
"version": dbnode.version or "",
Expand All @@ -380,7 +380,7 @@ def add_dbnode(self, dbnode: Node):
"document_id": dbnode.id,
"description": dbnode.description,
"links": [], # dbnode.links,
"tags": dbnode.tags,
"tags": [dbnode.tags] if isinstance(dbnode.tags, str) else dbnode.tags,
"metadata": "{}", # dbnode.metadata,
"hyperlink": "", # dbnode.hyperlink or "",
"version": dbnode.version or "",
Expand Down

0 comments on commit 496e8fb

Please sign in to comment.