Skip to content

修复:生成种子时统一对 created 做 str() 转换#8

Open
joy717 wants to merge 1 commit into
linux-do:masterfrom
joy717:fix/seed-created-str
Open

修复:生成种子时统一对 created 做 str() 转换#8
joy717 wants to merge 1 commit into
linux-do:masterfrom
joy717:fix/seed-created-str

Conversation

@joy717

@joy717 joy717 commented Jun 17, 2026

Copy link
Copy Markdown

问题

generate_final_seed 拼接种子时,对 valid_post_idsvalid_post_numbers 都用了 str() 包一层,唯独 valid_post_created 是直接 join:

','.join([str(i) for i in topic_info.valid_post_ids]),
','.join([str(i) for i in topic_info.valid_post_numbers]),
','.join(topic_info.valid_post_created),

一旦接口返回的 created 不是字符串,str.join 会抛 TypeError

修改

','.join([str(i) for i in topic_info.valid_post_created]),

与前两行保持一致,避免潜在的类型错误。

🤖 Generated with Claude Code

generate_final_seed wraps valid_post_ids and valid_post_numbers with
str() when joining, but joined valid_post_created raw. If the API ever
returns non-string created values, str.join raises TypeError. Wrap each
element with str() for consistency and safety.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant