DEV: only skip migration if a non seeded upload exists
Followup to 667b9801
This commit is contained in:
parent
667b98017a
commit
457be89445
|
@ -18,8 +18,8 @@ module Jobs
|
||||||
def execute_onceoff(args)
|
def execute_onceoff(args)
|
||||||
SETTINGS.each do |old_setting, new_setting|
|
SETTINGS.each do |old_setting, new_setting|
|
||||||
|
|
||||||
if upload_id = 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_id} already exists for it")
|
logger.warn("Skipping migration of the Site Setting #{new_setting} to url cause upload #{upload} already exists for it")
|
||||||
next
|
next
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue