@view_config(route_name='group_create',
             request_method='POST',
             renderer='h:templates/groups/create.html.jinja2')
def create(request):
    if request.authenticated_userid is None:
        raise exc.HTTPNotFound()

    form = _group_form(request)
    try:
        appstruct = form.validate(request.POST.items())
    except deform.ValidationFailure:
        return {'form': form.render()}

    group = models.Group(
        name=appstruct["name"], creator=request.authenticated_user)
    request.db.add(group)

    # We need to flush the db session here so that group.id will be generated.
    request.db.flush()

    _send_group_notification(request, 'group-join', group.pubid)

    url = request.route_url('group_read', pubid=group.pubid, slug=group.slug)
    return exc.HTTPSeeOther(url)
Change unread issues to open.
dataset/ETHPy150Open hypothesis/h/h/groups/views.py/create--crossover with--dataset/ETHPy150Open nickjj/build-a-saas-app-with-flask/catwatch/blueprints/issue/models.py/Issue.unread_to_open