Oops, fix validation bug for SwfAsset

Oh right, saving an asset that doesn't have a manifest will crash this
validation step!
This commit is contained in:
Emi Matchu 2023-11-10 16:16:32 -08:00
parent 96998643b5
commit d35b10c1b8

View file

@ -16,7 +16,7 @@ class SwfAsset < ApplicationRecord
scope :includes_depth, -> { includes(:zone) } scope :includes_depth, -> { includes(:zone) }
before_validation :normalize_manifest_url before_validation :normalize_manifest_url, if: :manifest_url?
def swf_image_dir def swf_image_dir
@swf_image_dir ||= Rails.root.join('tmp', 'asset_images_before_upload', self.id.to_s) @swf_image_dir ||= Rails.root.join('tmp', 'asset_images_before_upload', self.id.to_s)