[#3213] Feature lock adjustment for HashtagsTableMigrator.
authorIvan Tashkinov <ivantashkinov@gmail.com>
Sun, 17 Jan 2021 07:57:06 +0000 (10:57 +0300)
committerIvan Tashkinov <ivantashkinov@gmail.com>
Sun, 17 Jan 2021 07:57:06 +0000 (10:57 +0300)
lib/pleroma/migrators/hashtags_table_migrator.ex

index b40578d507d69f778810940f9a06f08cdeb6254d..47de5e134870e051427f44139f1c39623d9ec982 100644 (file)
@@ -196,11 +196,17 @@ defmodule Pleroma.Migrators.HashtagsTableMigrator do
   defp handle_success(data_migration) do
     update_status(:complete)
 
-    unless data_migration.feature_lock || Config.improved_hashtag_timeline() do
-      Config.put(Config.improved_hashtag_timeline_path(), true)
-    end
+    cond do
+      data_migration.feature_lock ->
+        :noop
+
+      not is_nil(Config.improved_hashtag_timeline()) ->
+        :noop
 
-    :ok
+      true ->
+        Config.put(Config.improved_hashtag_timeline_path(), true)
+        :ok
+    end
   end
 
   def failed_objects_query do