@classmethod<EOL><INDENT>def get_by_name(cls, name):<DEDENT>
try:<EOL><INDENT>return cls.query.filter_by(name=name).one()<EOL><DEDENT>except NoResultFound:<EOL><INDENT>return None<EOL><DEDENT>
Query group by a group name.

        :param name: Name of a group to search for.
        :returns: Group object or None.