From 496e8fb5c89d1e2a5810595810dbf08080c60251 Mon Sep 17 00:00:00 2001 From: john681611 Date: Thu, 5 Oct 2023 10:18:24 +0100 Subject: [PATCH] Fix: Tags strings splitting --- application/database/db.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/application/database/db.py b/application/database/db.py index 6f053a1e8..66306b45a 100644 --- a/application/database/db.py +++ b/application/database/db.py @@ -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, } ) @@ -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 "", @@ -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 "", @@ -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 "",