def get_role_by_id(app, role_id):
 sa_session = app.model.context.current
 return sa_session.query(app.model.Role).get(app.security.decode_id(role_id))

def get_role_by_id ( app , role_id ) : sa_session = app . model . context . current return sa_session . query ( app . model . Role ) . get ( app . security . decode_id ( role_id ) )
get a role from the database by id .