parent
40328f055e
commit
636b75fa16
|
@ -959,13 +959,16 @@ class Post < ActiveRecord::Base
|
||||||
end
|
end
|
||||||
|
|
||||||
count = 0
|
count = 0
|
||||||
missing_post_uploads = missing_post_uploads.reject { |_, uploads| uploads.empty? }
|
missing_post_uploads = missing_post_uploads.reject do |post_id, uploads|
|
||||||
missing_post_uploads.reject do |post_id, uploads|
|
if uploads.present?
|
||||||
PostCustomField.create!(post_id: post_id, name: Post::MISSING_UPLOADS, value: uploads.to_json)
|
PostCustomField.create!(post_id: post_id, name: Post::MISSING_UPLOADS, value: uploads.to_json)
|
||||||
count += uploads.count
|
count += uploads.count
|
||||||
end
|
end
|
||||||
|
|
||||||
return { uploads: missing_uploads, post_uploads: missing_post_uploads, count: count }
|
uploads.empty?
|
||||||
|
end
|
||||||
|
|
||||||
|
{ uploads: missing_uploads, post_uploads: missing_post_uploads, count: count }
|
||||||
end
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
Loading…
Reference in New Issue