From a385f6c48a4b60b9174ddeaa1452cbfe5e88ae28 Mon Sep 17 00:00:00 2001 From: Vinoth Kannan Date: Thu, 4 Apr 2019 21:49:44 +0530 Subject: [PATCH] REFACTOR: create custom field even when missing post uploads not found --- app/jobs/scheduled/ensure_post_uploads_existence.rb | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/app/jobs/scheduled/ensure_post_uploads_existence.rb b/app/jobs/scheduled/ensure_post_uploads_existence.rb index 327bdddb4a8..cc3434aa680 100644 --- a/app/jobs/scheduled/ensure_post_uploads_existence.rb +++ b/app/jobs/scheduled/ensure_post_uploads_existence.rb @@ -14,7 +14,7 @@ module Jobs .destroy_all Post - .joins("LEFT JOIN post_custom_fields cf ON posts.id = cf.post_id AND cf.name = 'missing_uploads'") + .joins("LEFT JOIN post_custom_fields cf ON posts.id = cf.post_id AND cf.name = '#{MISSING_UPLOADS}'") .where("(posts.cooked LIKE '%