Skip to content

Commit

Permalink
fix: Typo in user check
Browse files Browse the repository at this point in the history
  • Loading branch information
Mitcheljager committed Nov 26, 2024
1 parent 63ce8a2 commit cd2eb85
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/tasks/update_wiki_article_slugs.rake
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
2 changes: 1 addition & 1 deletion lib/tasks/upgrade_wiki_articles.rake
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit cd2eb85

Please sign in to comment.