Skip deleting a distributions test results if there are no test results for the distribution

This commit is contained in:
Chris Morgan
2007-08-27 03:46:03 +00:00
committed by WineHQ
parent db00c49d73
commit 82d02d655f

View File

@@ -157,11 +157,14 @@ class distribution {
return FALSE; return FALSE;
// delete any test results this distribution has // delete any test results this distribution has
if($this->aTestingIds)
{
foreach($this->aTestingIds as $iTestId) foreach($this->aTestingIds as $iTestId)
{ {
$oTestData = new TestData($iTestId); $oTestData = new TestData($iTestId);
$oTestData->delete(); $oTestData->delete();
} }
}
// now delete the Distribution // now delete the Distribution
$sQuery = "DELETE FROM distributions $sQuery = "DELETE FROM distributions