title: How to solve "'int' object is not subscriptable" in Django from a Kraken API
body: <p>I was wondering what the correct way is to save a number in Django SQLite coming from a Kraken API, when there is an Array of Array of strings or integers (<a href="https://docs.kraken.com/rest/#operation/getOHLCData" rel="nofollow noreferrer">https://docs.kraken.com/rest/#operation/getOHLCData</a>).</p>
  <p>my views.py</p>
  <pre><code>from rest_framework import generics
  from .serializers import KrakenSerializer
  from krakenohlc.models import Krak
  import requests
  
  class KrakenList(generics.RetrieveAPIView):
      serializer_class = KrakenSerializer
      queryset = Krak.objects.all()
  
      def get_object(request):
          url = 'https://api.kraken.com/0/public/OHLC?pair=XBTEUR'
          response = requests.get(url)
          data = response.json()
  
          for i in data['result'].values():  
              kraken_data = Krak(
                  time_0=(i[0][0]),
              )
              kraken_data.save()
  </code></pre>
  <p>my models.py</p>
  <pre><code>from django.db import models
  class Krak(models.Model):
      time_0 = models.IntegerField(blank=True, null=True)
  
      def __str__(self):
          return self.time_0
  </code></pre>
  <p>This is the error that i get in the browser:
  <a href="https://i.stack.imgur.com/5ITQV.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/5ITQV.png" alt="enter image description here" /></a></p>
  <p>The SQLite response is actually saving the API number in the database:
  <a href="https://i.stack.imgur.com/UUJpA.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/UUJpA.png" alt="enter image description here" /></a></p>
  <p>I researched and tried thoroughly many similar cases here, but none had the example of an API response with this error message.</p>