@communities.command()<EOL>@click.argument('<STR_LIT>')<EOL>@click.argument('<STR_LIT>')<EOL>@click.option('<STR_LIT>', '<STR_LIT>', '<STR_LIT>', is_flag=True, default=False)<EOL>@with_appcontext<EOL>def request(community_id, record_id, accept):
c = Community.get(community_id)<EOL>assert c is not None<EOL>record = Record.get_record(record_id)<EOL>if accept:<EOL><INDENT>c.add_record(record)<EOL>record.commit()<EOL><DEDENT>else:<EOL><INDENT>InclusionRequest.create(community=c, record=record,<EOL>notify=False)<EOL><DEDENT>db.session.commit()<EOL>RecordIndexer().index_by_id(record.id)<EOL>
Request a record acceptance to a community.