Upload.url can't be NULL

This commit is contained in:
Régis Hanol 2018-06-04 18:43:00 +02:00 committed by GitHub
parent 085eaaf18d
commit ab8cdd6b5b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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?