DEV: add extra safety around original post only implementation (#32521)

Instead of looking at post count that is cached, only ever look at the
post_number
which is guaranteed to be correct
This commit is contained in:
Sam
2025-04-30 08:45:28 +10:00
committed by GitHub
parent 5702cc9250
commit 067813e182

View File

@ -34,7 +34,7 @@ module DiscourseAutomation
original_post_only = automation.trigger_field("original_post_only")
if original_post_only["value"]
next if topic.posts_count > 1
next if post.post_number != 1
end
first_post_only = automation.trigger_field("first_post_only")