lib/daengine/teamsite_metadata_parser.rb in daengine-0.3.9.7 vs lib/daengine/teamsite_metadata_parser.rb in daengine-0.3.9.8

- old
+ new

@@ -87,9 +87,12 @@ DigitalAsset.where(guid: key).try :delete_all delete_count += 1 elsif (assets[key]['expires_at'].nil? || (assets[key]['expires_at'] < 1.minute.from_now)) DigitalAsset.where(guid: key).try :delete_all delete_count += 1 + elsif (assets[key]['content_type'].== DigitalAsset::XBRL_DOCUMENT) + DigitalAsset.where(guid: key).try :delete_all + delete_count += 1 else da = DigitalAsset.find_or_initialize_by(guid: key) asset_docs = trim_package(assets[key]['documents_attributes'], last_read, da) if (!asset_docs.empty?) assets[key]['documents_attributes'] = asset_docs \ No newline at end of file