Fix entity was set to 0 on group creation

This commit is contained in:
Maxime Kohlhaas 2021-05-16 09:58:34 +02:00
parent a9ddf2a5ad
commit e5e317bae3

View File

@ -138,7 +138,7 @@ if (empty($reshook)) {
if (!empty($conf->multicompany->enabled) && !empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE)) {
$object->entity = 0;
} else {
$object->entity = GETPOST("entity");
$object->entity = GETPOSTISSET("entity") ? GETPOST("entity") : $conf->entity;
}
$db->begin();