from sqlalchemy.orm.exc import NoResultFound
from users import models as user_models


def groupfinder(userid, request):
    try:
        user = request.rel_db_session.query(user_models.User).filter_by(id=
            userid).one()
    except NoResultFound:
        return []
    return [user.group.name]

1c1a8a0e2baf1643df97a3c3d36ce2bf95c3c461
<mask token>

<mask token>


def groupfinder(userid, request):
    try:
        user = request.rel_db_session.query(user_models.User).filter_by(id=
            userid).one()
    except NoResultFound:
        return []
    return [user.group.name]

from sqlalchemy.orm.exc import NoResultFound
from users import models as user_models


def groupfinder(userid, request):
    try:
        user = request.rel_db_session.query(user_models.User).filter_by(id=
            userid).one()
    except NoResultFound:
        return []
    return [user.group.name]
