mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 16:46:12 +08:00
FIX: do not attempt to migrate pre-existing uploads
This makes this job re-runnable just in case cause it will skip creation of new uploads if an upload already exists
This commit is contained in:
parent
4182d8638c
commit
667b98017a
|
@ -17,6 +17,12 @@ module Jobs
|
|||
|
||||
def execute_onceoff(args)
|
||||
SETTINGS.each do |old_setting, new_setting|
|
||||
|
||||
if upload_id = SiteSetting.get(new_setting)
|
||||
logger.warn("Skipping migration of the Site Setting #{new_setting} to url cause upload #{upload_id} already exists for it")
|
||||
next
|
||||
end
|
||||
|
||||
old_url = DB.query_single(
|
||||
"SELECT value FROM site_settings WHERE name = '#{old_setting}'"
|
||||
).first
|
||||
|
|
Loading…
Reference in New Issue
Block a user