From b7387d4611b0b3416daf48ba1e4ca82e1d83ecaa Mon Sep 17 00:00:00 2001 From: Guo Xiang Tan Date: Wed, 20 May 2020 10:22:51 +0800 Subject: [PATCH] DEV: Remove code unused code when seeding narrative bot. --- .../db/fixtures/001_discobot.rb | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/plugins/discourse-narrative-bot/db/fixtures/001_discobot.rb b/plugins/discourse-narrative-bot/db/fixtures/001_discobot.rb index bc204e4021b..fda50b48299 100644 --- a/plugins/discourse-narrative-bot/db/fixtures/001_discobot.rb +++ b/plugins/discourse-narrative-bot/db/fixtures/001_discobot.rb @@ -26,19 +26,6 @@ unless user = User.find_by(id: DiscourseNarrativeBot::BOT_USER_ID) u.approved = true u.trust_level = TrustLevel[4] end - - # TODO Pull the user avatar from that thread for now. In the future, pull it from a local file or from some central discobot repo. - if !Rails.env.test? - begin - UserAvatar.import_url_for_user( - "https://cdn.discourse.org/dev/uploads/default/original/2X/e/edb63d57a720838a7ce6a68f02ba4618787f2299.png", - User.find(DiscourseNarrativeBot::BOT_USER_ID), - override_gravatar: true - ) - rescue - # In case the avatar can't be downloaded, don't fail seed - end - end end bot = User.find(DiscourseNarrativeBot::BOT_USER_ID)