fixes #3826: no more sql errors when trying to search for environments (also domains, operatingsystems, and models)
fixes #3826: no more sql errors when trying to search for environments (also domains, operatingsystems, and models)