Fix spam_held reference in thread_uri code path after rebase

This commit is contained in:
russell@unturf.com 2026-02-02 14:14:48 -05:00
parent 070a6b678d
commit 82316fb8f7

View file

@ -550,9 +550,13 @@ def api_create_thread(request):
node_event = node.new_event(user, "commented")
request.dbsession.add(user)
if spam_held:
if spam_result.get("action") == "held":
node.approved = False
# Store spam data on node for moderation UI
node.spam_score = spam_result.get("spam_score")
node.spam_reason = spam_result.get("spam_reason")
# Bump thread
root.changed = node.changed
root._invalidate_cache()