Int() argument must be a string, a bytes-like object or a number, not 'list

def request_id_generator(script_id):

    script_id = str(script_id)
    mnf_reference = MNFScriptDatabase_2.objects.get(script_id=script_id)
    service_no = int(mnf_reference.script_used_by_services) + 1
    mnf_reference.script_used_by_services = int(service_no)
    mnf_reference.save()
    request_id = str(script_id) + "_" + str(service_no)
    return request_id
Back to Top