From 8246b7ec887c64128fcd38b54e9f1d7c53c64f64 Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Thu, 29 Jul 2010 10:30:14 -0700 Subject: [PATCH] Also find assets that are missing entries in their class hierarchy, as well as in asset and assetData. --- sbin/findBrokenAssets.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sbin/findBrokenAssets.pl b/sbin/findBrokenAssets.pl index 6bd383167..76a90a3e2 100644 --- a/sbin/findBrokenAssets.pl +++ b/sbin/findBrokenAssets.pl @@ -65,8 +65,8 @@ my $sth = $session->db->read($sql); my $count = 1; my %classTables; # Cache definition lookups while ( my %row = $sth->hash ) { - eval { WebGUI::Asset->newPending( $session, $row{assetId} ) }; - if ( $@ ) { + my $asset = eval { WebGUI::Asset->newPending( $session, $row{assetId} ) }; + if ( $@ || ! $asset ) { # Replace the progress bar with a message printf "\r%-68s", "-- Corrupt: $row{assetId}";