allow broken image resubmits after 1hr

This commit is contained in:
Emi Matchu 2011-08-07 20:43:42 -04:00
parent c54030f3b3
commit b50b9d237d

View file

@ -109,8 +109,11 @@ class SwfAsset < ActiveRecord::Base
!has_image? || image_pending_repair?
end
REPAIR_PENDING_EXPIRES = 1.hour
def image_pending_repair?
reported_broken_at && (converted_at.nil? || reported_broken_at > converted_at)
reported_broken_at &&
(converted_at.nil? || reported_broken_at > converted_at) &&
reported_broken_at > REPAIR_PENDING_EXPIRES.ago
end
attr_accessor :item