From ab8cdd6b5b3b7d9ece259fc127b38ca35516bcb8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20Hanol?= Date: Mon, 4 Jun 2018 18:43:00 +0200 Subject: [PATCH] Upload.url can't be NULL --- app/jobs/scheduled/clean_up_uploads.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/jobs/scheduled/clean_up_uploads.rb b/app/jobs/scheduled/clean_up_uploads.rb index dec8b0ec485..d2d2cfe9642 100644 --- a/app/jobs/scheduled/clean_up_uploads.rb +++ b/app/jobs/scheduled/clean_up_uploads.rb @@ -9,7 +9,7 @@ module Jobs Upload .where("retain_hours IS NULL OR created_at < current_timestamp - interval '1 hour' * retain_hours") .where("created_at < ?", grace_period.hour.ago) - .where(url: nil) + .where(url: "") .destroy_all return unless SiteSetting.clean_up_uploads?