FIX: Fix incorrect hashtag setting migration (#19857)

Added in c2013865d78d353280ae68135b4c218e21ffb566,
this migration was supposed to only turn off the hashtag
setting for existing sites (since that was the old default)
but its doing it for new ones too because we run all migrations
on new sites.

Instead, we should only run this if the first migration was
only just created, meaning its a new site.
This commit is contained in:
Martin Brennan
2023-01-16 10:53:00 +10:00
committed by GitHub
parent 2eb0a300b6
commit 7c97548159
6 changed files with 33 additions and 2 deletions

View File

@ -494,6 +494,9 @@ RSpec.describe DiscourseNarrativeBot::AdvancedUserNarrative do
end
it "should create the right reply" do
# TODO (martin) Remove when enable_experimental_hashtag_autocomplete is default for all sites
SiteSetting.enable_experimental_hashtag_autocomplete = false
category = Fabricate(:category)
post.update!(raw: "Check out this ##{category.slug}")