error 500 usando ajax en para recibir un json en django

Estoy trabajando con Django y recibo un error 500, a una petición con Ajax. Tengo un modelo “Item”, al que he convertido a diccionario, y creado una funcion toJson(), que debe permitirme obtener todo el objeto en un input, para hacer un select, para esto empleo como dije Ajax con una petición POST, , pero en vez de eso viene vacio.
Se que el error tiene que ver con la composicion del JSON que construyo porque con postman he visto que hay un problema con los indices, porque este es el error que tira: list indices must be integers or slices, not str.

Muestro el modelo, el ajax y la vista

“MODELO”


    class Item(models.Model): 
        operation = models.ForeignKey(Operation, on_delete=models.CASCADE)
        brand = models.ForeignKey(Brand, on_delete=models.CASCADE)
        subcategory = models.ForeignKey(SubcategoryItem, on_delete=models.CASCADE)
        categ = models.ForeignKey(CategItem, on_delete=models.CASCADE)
        section = models.ForeignKey(Section, on_delete=models.CASCADE)
        currency = models.ForeignKey(Currency, on_delete=models.CASCADE)
        item_name = models.CharField(max_length=255, verbose_name='item')
        item_description = models.TextField(null=True)
        item_SKU = models.CharField(max_length=100, null=False, blank=True)
        ean = models.CharField(max_length=100, unique=True)
        created_at = models.DateTimeField(auto_now_add=True)
        updated_at = models.DateTimeField(auto_now=True)
        status = models.CharField(max_length=100, null=True)
        is_active = models.BooleanField()
        price = models.PositiveIntegerField(null=True)
        purchase_price = models.PositiveIntegerField(null=True, blank=True)
        tax = models.PositiveIntegerField(null=True)
        color = models.CharField(max_length=30, null=True)
        size = models.CharField(max_length=3, null=True, blank=True)
        weight = models.CharField(max_length=5, null=True, blank=True)
        height = models.CharField(max_length=5, null=True, blank=True)
    
        image = models.ImageField(
            upload_to='backoffice/static/images',
            blank=True,
            null=True
        )
        image_1 = models.ImageField(
            upload_to='backoffice/static/images',
            blank=True,
            null=True
        )
        image_2 = models.ImageField(
            upload_to='backoffice/static/images',
            blank=True,
            null=True
        )
        image_3 = models.ImageField(
            upload_to='backoffice/static/images',
            blank=True,
            null=True
        )
        image_4 = models.ImageField(
            upload_to='backoffice/static/images',
            blank=True,
            null=True
        )
        image_5 = models.ImageField(
            upload_to='backoffice/static/images',
            blank=True,
            null=True
        )
    
        class Meta:
            ordering = ('item_name',)
    
        def __str__(self):
            return self.item_name
    
        def toJSON(self):
            item = model_to_dict(self)
            item('image') = self.get_image()
            item('image_1') = self.get_image()
            item('image_2') = self.get_image()
            item('image_3') = self.get_image()
            item('image_4') = self.get_image()
            item('image_5') = self.get_image()
            item('operation') = self.operation.toJSON()
            item('brand') = self.brand.toJSON()
            item('subcategory') = self.subcategory.toJSON()
            item('categ') = self.categ.toJSON()
            item('section') = self.section.toJSON()
            item('price') = format(self.price, '.2f')
            item('purchase_price') = format(self.purchase_price, '.2f')
            item('tax') = format(self.tax, '.2f')
            return item
        
        def get_absolute_url(self):
            return reverse('all_items.html', kwargs={'pk':self.id})
    ```
    
    "View"
    ```
    class SoldCreate(LoginRequiredMixin, CreateView):
        model = Sold
        form_class = SoldForm
        template_name = 'solds/add_invoice.html'
    
        def get_context_data(self, **kwargs):
            context = super().get_context_data(**kwargs)
            context('tittle') = 'Sold Forms'
            context('table_tittle') = 'New sold'
            context('table_subtittle') = 'Add here your new solds'
            return context
        
        @method_decorator(csrf_exempt)
        def dispatch(self, *args, **kwargs):
            return super().dispatch(*args, **kwargs)
        
        @method_decorator(csrf_exempt)
        def post(self, request, *args,**kwargs):
            data={}
            try:
                action = request.POST('action')
                if action == 'search_item':
                    
                    data=()
                    prods = Item.objects.filter(item_name=request.POST('term'))
                    
                    
                    for i in prods:
                        item = i.toJSON()
                        item('value') = i.item_name
                        data.append(item)
                        #data.append(i.toJSON())
    
                else:
                    data('error')='no ha ingresado una opcion'
            except Exception as e:
                data('error') = str(e)
        
            return JsonResponse(data, safe=False)
            
        def get_success_url(self):
            return reverse('all_sold') ```
    
    "Ajax"
    ````
    $('input(name="search_box"s)').autocomplete({
        source:function(request, response){
            alert(request.term);
    
            $.ajax({
                url:window.location.pathname,
                type: 'POST',
                data: {
                    'action':'search_item',
                    'term': request.term
                },
                dataType:'json',
            }).done(function(data){
                response(data);
                console.log(data);
            }).fail(function (jqXHR,textStatus, errorTrown){
                alert(errorTrown);
            }).always(function(data){
    
            });
    
        },
        delay: 500,
        minLength: 1,
        select: function(event, ui){
            console.log(ui.item); 
    
        }
    });