Merge pull request #124 from aa65535/patch-1

修复小红书评论重复插入
This commit is contained in:
relakkes 2024-01-25 14:33:09 +08:00 committed by GitHub
commit f1d3bc6e28
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -107,7 +107,7 @@ class XhsDbStoreImplement(AbstractStore):
"""
from .xhs_store_db_types import XHSNoteComment
comment_id = comment_item.get("id")
comment_id = comment_item.get("comment_id")
if not await XHSNoteComment.filter(comment_id=comment_id).first():
comment_item["add_ts"] = utils.get_current_timestamp()
comment_pydantic = pydantic_model_creator(XHSNoteComment, name="CommentPydanticCreate", exclude=('id',))