@view_config(route_name='<STR_LIT>',<EOL>request_method='<STR_LIT:GET>',<EOL>accept='<STR_LIT:application/json>', renderer='<STR_LIT>', http_cache=<NUM_LIT:0>)<EOL>def get_license_request(request):
uuid_ = request.matchdict['<STR_LIT>']<EOL>user_id = request.matchdict.get('<STR_LIT>')<EOL>args = [uuid_]<EOL>if user_id is not None:<EOL><INDENT>fmt_conditional = "<STR_LIT>"<EOL>args.append(user_id)<EOL><DEDENT>else:<EOL><INDENT>fmt_conditional = "<STR_LIT>"<EOL><DEDENT>with db_connect() as db_conn:<EOL><INDENT>with db_conn.cursor() as cursor:<EOL><INDENT>cursor.execute("""<STR_LIT>""", (uuid_,))<EOL>try:<EOL><INDENT>license_url = cursor.fetchone()[<NUM_LIT:0>]<EOL><DEDENT>except TypeError:  <EOL><INDENT>raise httpexceptions.HTTPNotFound()<EOL><DEDENT>cursor.execute("""<STR_LIT>""".format(fmt_conditional), args)<EOL>acceptances = [r[<NUM_LIT:0>] for r in cursor.fetchall()]<EOL><DEDENT><DEDENT>if user_id is not None:<EOL><INDENT>acceptances = acceptances[<NUM_LIT:0>]<EOL><DEDENT>resp_value = {<EOL>'<STR_LIT>': license_url,<EOL>'<STR_LIT>': acceptances,<EOL>}<EOL>return resp_value<EOL>
Returns a list of those accepting the license.