CC-4579: Edit Metadata: Track number defaults to 0 if it is deleted

-fixed
This commit is contained in:
denise 2012-10-16 15:56:03 -04:00
parent 5d1d68d96b
commit 819dcf70fd
1 changed files with 4 additions and 0 deletions

View File

@ -196,6 +196,10 @@ class Application_Model_StoredFile
if (isset($this->_dbMD[$dbColumn])) {
$propelColumn = $this->_dbMD[$dbColumn];
$method = "set$propelColumn";
/* We need to set track_number to null if it is an empty string
* because propel defaults empty strings to zeros */
if ($dbColumn == "track_number" && empty($mdValue)) $mdValue = null;
$this->_file->$method($mdValue);
}
}