From 2bb740cb165cb0e90be6007db857d7f1088bd725 Mon Sep 17 00:00:00 2001 From: Krzysztof Kotlarek Date: Mon, 9 Sep 2024 10:40:43 +1000 Subject: [PATCH] FIX: reset cache after flags are seed (#28801) There was a bug report on meta that after deployment, some topics were not loaded properly for 24 hours - https://meta.discourse.org/t/endless-spinner-on-some-posts/323031/17 In this PR we moved the `like` post action type to the database - https://github.com/discourse/discourse/pull/28362 However, flags are cached for performance reasons https://github.com/discourse/discourse/blob/main/app/serializers/site_serializer.rb#L113 After seed, we should ensure that the cache is reset so the site has access to all post-action types. --- db/fixtures/003_flags.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/db/fixtures/003_flags.rb b/db/fixtures/003_flags.rb index b905f1fc7a1..008c01b31c0 100644 --- a/db/fixtures/003_flags.rb +++ b/db/fixtures/003_flags.rb @@ -74,3 +74,5 @@ Flag.unscoped.seed do |s| s.applies_to = %w[Post] s.skip_reset_flag_callback = true end + +Flag.reset_flag_settings!