Change the data structure

This commit is contained in:
XCX 2023-08-13 21:38:48 +08:00
parent 1602d03e9d
commit 1d79556c42

View File

@ -237,7 +237,7 @@ def process_article(title, article_url):
author_data = { author_data = {
"author_id": str(uuid.uuid4()), "author_id": str(uuid.uuid4()),
"from_article": article_id, "from_article": [article_id],
"first_name": name[0], "first_name": name[0],
"last_name": name[-1], "last_name": name[-1],
"middle_name": ''.join(name[1:-1]) if name[1:-1] else None, "middle_name": ''.join(name[1:-1]) if name[1:-1] else None,