Fix spam_held reference in thread_uri code path after rebase
This commit is contained in:
parent
070a6b678d
commit
82316fb8f7
1 changed files with 5 additions and 1 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue