DEV: Don't warn about valid data

This commit is contained in:
Jarek Radosz 2020-04-26 22:18:44 +02:00
parent 0ae504aece
commit e0aec23844
1 changed files with 2 additions and 4 deletions

View File

@ -17,11 +17,9 @@ module Jobs
def execute_onceoff(args)
SETTINGS.each do |old_setting, new_setting|
upload = SiteSetting.get(new_setting)
if (upload = SiteSetting.get(new_setting)) && upload.id >= Upload::SEEDED_ID_THRESHOLD
logger.warn("Skipping migration of the Site Setting #{new_setting} to url cause upload #{upload} already exists for it")
next
end
next if upload && upload.id >= Upload::SEEDED_ID_THRESHOLD
old_url = DB.query_single(
"SELECT value FROM site_settings WHERE name = '#{old_setting}'"