'Update the given group'

def update(self, trans, group, name=None, description=None):

    changed = False
    if (not trans.user_is_admin()):
        raise ItemAccessibilityException('Only    administrators    can    update    groups.')
    if group.deleted:
        raise RequestParameterInvalidException('You    cannot    modify    a    deleted    group.    Undelete    it    first.')
    if (name is not None):
        group.name = name
        changed = True
    if (description is not None):
        group.description = description
        changed = True
    if changed:
        trans.sa_session.add(group)
        trans.sa_session.flush()
    return group
