Cleaned event create control for centralized management

This commit is contained in:
Jose Gonzalez 2021-04-15 15:50:10 +02:00
parent 3d3beca727
commit a6936f16d5
1 changed files with 0 additions and 11 deletions

View File

@ -182,20 +182,9 @@ class Event extends Entity
*/
public function save()
{
global $config;
if (is_metaconsole() === false && isset($config['centralized_management']) === true
&& (bool) $config['centralized_management'] === true
) {
throw new \Exception(
'error, cannot save in centralized management environment.'
);
}
$values = $this->fields;
// Clean null fields.
foreach ($values as $k => $v) {
hd('"'.$k.'" "'.$v.'"', true);
if ($v === null) {
unset($values[$k]);
}