diff --git a/htdocs/categories/class/categorie.class.php b/htdocs/categories/class/categorie.class.php index ad7128c31ef..2c2bea3ce0f 100644 --- a/htdocs/categories/class/categorie.class.php +++ b/htdocs/categories/class/categorie.class.php @@ -917,7 +917,8 @@ class Categorie extends CommonObject { // phpcs:enable $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."categorie"; - $sql.= " WHERE fk_parent = ".$this->id; + $sql .= " WHERE fk_parent = ".$this->id; + $sql .= " AND entity IN (".getEntity('category').")"; $res = $this->db->query($sql); if ($res)