From cd2eb856b79dcf97a14c190fce58eba1a82f4774 Mon Sep 17 00:00:00 2001 From: Mitchel Date: Tue, 26 Nov 2024 14:41:13 +0100 Subject: [PATCH] fix: Typo in user check --- lib/tasks/update_wiki_article_slugs.rake | 2 +- lib/tasks/upgrade_wiki_articles.rake | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/tasks/update_wiki_article_slugs.rake b/lib/tasks/update_wiki_article_slugs.rake index b733e531..82901b7d 100644 --- a/lib/tasks/update_wiki_article_slugs.rake +++ b/lib/tasks/update_wiki_article_slugs.rake @@ -1,7 +1,7 @@ desc "Upgrade wiki articles slugs from + to - for spaces" task :update_wiki_article_slugs => :environment do user = User.find_by_username("mitsiee") - user = User.find_by_username("admin") unless @user.present? + user = User.find_by_username("admin") unless user.present? articles_ids = Wiki::Article.group(:group_id).maximum(:id).values articles = Wiki::Article.where(id: articles_ids) diff --git a/lib/tasks/upgrade_wiki_articles.rake b/lib/tasks/upgrade_wiki_articles.rake index b8f3f6a1..8c720071 100644 --- a/lib/tasks/upgrade_wiki_articles.rake +++ b/lib/tasks/upgrade_wiki_articles.rake @@ -5,7 +5,7 @@ task :upgrade_wiki_articles => :environment do defaults = YAML.safe_load(File.read(Rails.root.join("config/arrays/wiki", "defaults.yml"))) user = User.find_by_username("mitsiee") - user = User.find_by_username("admin") unless @user.present? + user = User.find_by_username("admin") unless user.present? (actions + values).each do |current| article = Wiki::Article.where(title: current["en-US"]).last