mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-23 10:38:45 +02:00
Fixed issue with null value for an Enum that would be hidden in a given state, being handled as an empty string, which is not an allowed value.
SVN:trunk[541]
This commit is contained in:
@@ -972,6 +972,14 @@ class AttributeEnum extends AttributeString
|
||||
}
|
||||
return $aLocalizedValues;
|
||||
}
|
||||
|
||||
public function MakeRealValue($proposedValue)
|
||||
{
|
||||
// For an enum, let's consider an empty value like a null value
|
||||
// Could be implemented by changing the UI : no value => let the default value
|
||||
if ($proposedValue == '') return null;
|
||||
return parent::MakeRealValue($proposedValue);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user