Check if there is a group and bail otherwise
If there is no group name specified search_groups will return all the
groups, so a list not a single group making the assumption made by the
code invalid and thus leading to a traceback.
Fixes https://pagure.io/pagure/issue/2463
Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr></pingou@pingoured.fr>