fix(fudai): 验证器不再因内容为空而拒绝有效福袋
当奖品价值>0且倒计时合理时,内容为空是正常的(部分福袋无文字 内容),不应判定验证失败导致跳过参与。 Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
2fab3f238e
commit
d850af2c44
1 file changed
+9
-2
@@ -74,10 +74,17 @@ def validate_fudai_detail(detail: Tuple, analyser: Any = None) -> Tuple[bool, st
|
||||
pass
|
||||
if not disable_content:
|
||||
if not content or len(content.strip()) < 2:
|
||||
return False, "content_empty_or_too_short"
|
||||
# 内容为空但价值和倒计时都合理时,不应判定失败(部分福袋确实无文字内容)
|
||||
if prize_value_yuan > 0 and countdown_end is not None and countdown_end > 0:
|
||||
pass
|
||||
else:
|
||||
return False, "content_empty_or_too_short"
|
||||
except Exception:
|
||||
if not content or len(content.strip()) < 2:
|
||||
return False, "content_empty_or_too_short"
|
||||
if prize_value_yuan > 0 and countdown_end is not None and countdown_end > 0:
|
||||
pass
|
||||
else:
|
||||
return False, "content_empty_or_too_short"
|
||||
|
||||
# 检查2:价值应该大于0(福袋至少应该有价值)
|
||||
if prize_value_yuan <= 0:
|
||||
|
||||
Reference in new issue
Block a user