title: while calling a method multiple times,some data are missing while using django rest serializer?
body: <p>serializer.py</p>
  
  <p>The get_invoice_list method calling invoice_date() multiple times but some data are missing,while i trying to convert invoice_list into dict ,</p>
  
  <pre><code>class InvoiceDetailSerializer(ModelSerializer):
  
      invoice_list = serializers.SerializerMethodField()
  
      def get_invoice_list(self, obj):
  
          invoice_list =[]
          if obj.get_invoice_users.all():
              first = False
              second = False
              third = False
  
              reg_invoices = obj.get_invoice_users.all().filter(type__in=[0,1]).order_by('created_date')            
              if reg_invoices:
                  inv_string = 'INV'+str(obj.get_invoice_number)+'001'
                  new_list1 = self.get_invoice_data(reg_invoices, inv_string)
                  invoices_list.append(new_list)
                  first = True                
  
              hotel_invoices = obj.get_invoice_users.all().filter(type__in=[3,5]).order_by('created_date')
              if hotel_invoices:
                  second = True
                  if first:
                      inv_string = 'INV'+str(obj.get_invoice_number)+'002'
                  else:
                      inv_string = 'INV'+str(obj.get_invoice_number)+'001'
                  new_list2 = self.get_invoice_data(hotel_invoices, inv_string)
                  invoices_list.append(new_list2)
          return invoices_list       
      def get_invoice_data(self, inv_list, inv_key):
  
          invoices_list = []
          reg_invoices_list = []
          index=0
          new_dict = {}
          for index, each_invoice in enumerate(inv_list):
  
              new_dict['first_name'] = each_invoice.users.user.first_name
              new_dict['invoice_number'] = inv_key
              return new_dict  
  </code></pre>
  
  <p>view:</p>
  
  <pre><code>class InvoiceDetailViewSet(ModelViewSet):
      serializer_class = InvoiceDetailSerializer
      queryset = EventUsers.objects.all()
      permission_classes = [AllowAny, ] 
  </code></pre>
  
  <p>response :</p>
  
  <p>Now i am getting response like this, </p>
  
  <pre><code>[ 
   {
          "invoice_list": [
              {
                  "invoice_number": "INV013001",
                  "first_name": "546546",
  
              },
              {
                  "invoice_number": "INV013002",
                  "first_name": "546546",
  
              }
          ]
      }
  ]
  </code></pre>
  
  <p>I want the second dict ie "invoice_number": "INV013002" as another
  dict not in an arrey how can i done that,</p>
  
  <pre><code>[
      {
      "invoice_list": [
          {
              "invoice_number": "INV013001",
              "first_name": "546546",
  
          }
      ]
  },
  {
      "invoice_list": [
          {
               "invoice_number": "INV013002",
                "first_name": "546546",
          }
      ]
  },
  ]
  </code></pre>