fix(legacy): sanitize track_type_id when updating file (#2003)
Fixes #2000
This commit is contained in:
parent
e6d24333cb
commit
f137be09a1
2 changed files with 9 additions and 0 deletions
|
@ -229,6 +229,12 @@ class Application_Model_StoredFile
|
|||
if ($dbColumn == 'track_number' && empty($mdValue)) {
|
||||
$mdValue = null;
|
||||
}
|
||||
|
||||
// We need to set track_type_id to null if it is an empty string or 0
|
||||
if ($dbColumn == 'track_type_id' && ($mdValue == 0 || empty($mdValue))) {
|
||||
$mdValue = null;
|
||||
}
|
||||
|
||||
$this->_file->{$method}($mdValue);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue