title: AttributeError Django rest framework
body: <p>.save process is ok and data is reflected on DB but i am getting this error.
  "AttributeError: Got AttributeError when attempting to get a value for field <code>asset_list</code> on serializer <code>TransactionSerializer</code>."</p>
  
  <p>Traceback</p>
  
  <pre><code>Traceback (most recent call last):
    File "C:\Users\a.wong\AppData\Local\Programs\Python\Python38-32\lib\site-packages\django\core\handlers\exception.py", line 34, in inner
  response = get_response(request)
    File "C:\Users\a.wong\AppData\Local\Programs\Python\Python38-32\lib\site-packages\django\core\handlers\base.py", line 115, in _get_response
  response = self.process_exception_by_middleware(e, request)
    File "C:\Users\a.wong\AppData\Local\Programs\Python\Python38-32\lib\site-packages\django\core\handlers\base.py", line 113, in _get_response
  response = wrapped_callback(request, *callback_args, **callback_kwargs)
    File "C:\Users\a.wong\AppData\Local\Programs\Python\Python38-32\lib\site-packages\django\views\decorators\csrf.py", line 54, in wrapped_view
  return view_func(*args, **kwargs)
    File "C:\Users\a.wong\AppData\Local\Programs\Python\Python38-32\lib\site-packages\django\views\generic\base.py", line 71, in view
  return self.dispatch(request, *args, **kwargs)
    File "C:\Users\a.wong\AppData\Local\Programs\Python\Python38-32\lib\site-packages\rest_framework\views.py", line 505, in dispatch
  response = self.handle_exception(exc)
    File "C:\Users\a.wong\AppData\Local\Programs\Python\Python38-32\lib\site-packages\rest_framework\views.py", line 465, in handle_exception
  self.raise_uncaught_exception(exc)
    File "C:\Users\a.wong\AppData\Local\Programs\Python\Python38-32\lib\site-packages\rest_framework\views.py", line 476, in raise_uncaught_exception
  raise exc
    File "C:\Users\a.wong\AppData\Local\Programs\Python\Python38-32\lib\site-packages\rest_framework\views.py", line 502, in dispatch
  response = handler(request, *args, **kwargs)
    File "C:\Users\a.wong\assetWorkspace\Asset\AIMS-BE\V1\transactions\views\transactions_view.py", line 22, in post
  return Response(TransactionSerializer(transaction).data, status=status.HTTP_201_CREATED)
    File "C:\Users\a.wong\AppData\Local\Programs\Python\Python38-32\lib\site-packages\rest_framework\serializers.py", line 562, in data
  ret = super().data
    File "C:\Users\a.wong\AppData\Local\Programs\Python\Python38-32\lib\site-packages\rest_framework\serializers.py", line 260, in data
  self._data = self.to_representation(self.instance)
    File "C:\Users\a.wong\AppData\Local\Programs\Python\Python38-32\lib\site-packages\rest_framework\serializers.py", line 516, in to_representation
  attribute = field.get_attribute(instance)
    File "C:\Users\a.wong\AppData\Local\Programs\Python\Python38-32\lib\site-packages\rest_framework\fields.py", line 487, in get_attribute
  raise type(exc)(msg)
  AttributeError: Got AttributeError when attempting to get a value for field `asset_list` on serializer `TransactionSerializer`.
  The serializer field might be named incorrectly and not match any attribute or key on the `Transaction` instance.
  Original exception text was: 'Transaction' object has no attribute 'asset_list'.
  </code></pre>
  
  <p><strong>Models</strong></p>
  
  <p>transaction_main</p>
  
  <pre><code>from V1.accounts.models.employee_main import Employee
  
  class Transaction(CreatedModified):
  
      transaction_id = models.BigAutoField(primary_key=True)
      employee_from = models.ForeignKey(
          Employee,
          related_name='employee_from_transactions', 
          related_query_name='employee_from_transaction',
          default=None,
          on_delete=models.CASCADE
      )
      employee_to = models.ForeignKey(
          Employee,
          related_name='employee_to_transactions', 
          related_query_name='employee_to_transaction',
          default=None,
          on_delete=models.CASCADE
      ) 
      location_from = models.CharField(null=True, blank=True, max_length=255)
      location_to = models.CharField(null=True, blank=True, max_length=255)
      transaction_type = models.CharField(
          max_length=3,
          choices=TransactionType.choices,
          default=None
      )
      date_issued = models.DateField(auto_now=False, auto_now_add=False)
      remarks = models.CharField(null=True, blank=True, max_length=255)
  </code></pre>
  
  <p>transaction_main_asset</p>
  
  <pre><code>from V1.transactions.models.transaction_main import Transaction
  from V1.assets.models.asset_main import Asset
  
  
  class TransactionAssets(CreatedModified):
  
      transaction = models.ForeignKey(
          Transaction, 
          related_name='tr_assets_transactions', 
          related_query_name='tr_assets_transaction',
          default=None,
          on_delete=models.CASCADE
      )
      asset = models.ForeignKey(
          Asset,
          related_name='assets_transactions', 
          related_query_name='assets_transaction',
          default=None,
          on_delete=models.CASCADE
      )
      created_at  = models.DateTimeField(auto_now_add=True, editable=False)
      created_by  = models.ForeignKey(settings.AUTH_USER_MODEL,
                      null=True, db_index=True, editable=False,
                      on_delete=models.SET_NULL, related_name="tr_assets_created")
  </code></pre>
  
  <p><strong>Serializers</strong></p>
  
  <p>transaction_asset_serializer</p>
  
  <pre><code>from V1.transactions.models.transaction_main_assets import TransactionAssets
  
  class Transaction_AssetsSerializer(serializers.ModelSerializer):
  
      class Meta:
          model = TransactionAssets
          fields = ('asset',)
  </code></pre>
  
  <p>transaction_serializer</p>
  
  <pre><code>from V1.transactions.models.transaction_main import Transaction
  from V1.transactions.models.transaction_main_assets import TransactionAssets
  from V1.transactions.serializers.transactions_asset_serializer import Transaction_AssetsSerializer
  
  
  
  
  class TransactionSerializer(serializers.ModelSerializer):
      asset_list = Transaction_AssetsSerializer(many=True)
  
      class Meta:
          model = Transaction
          fields = (
              'employee_from',
              'employee_to',
              'location_from',
              'location_to',
              'transaction_type',
              'date_issued',
              'remarks',
              'asset_list'
          )
  
      def create(self, validated_data):  
          asset_data = validated_data.pop('asset_list')
  
          transaction = Transaction.objects.create(
              employee_from = validated_data['employee_from'],
              employee_to = validated_data['employee_to'],
              location_from = validated_data['location_from'],
              location_to = validated_data['location_to'],
              transaction_type = validated_data['transaction_type'],
              date_issued = validated_data['date_issued'],
              remarks = validated_data['remarks'],
              created_by=self.context['request'].user
           )
  
          for Transaction_item in asset_data:
              TransactionAssets.objects.create(
                  transaction=transaction, 
                  created_by=self.context['request'].user,
                  **Transaction_item
              )
  
          return transaction
  </code></pre>
  
  <p><strong>View</strong></p>
  
  <pre><code>class TransactionList(APIView):
  @staticmethod
  def get(request):
      transactions = Transaction.objects.all()
      return Response(TransactionSerializer(transactions, many=True).data)
  
  @staticmethod
  def post(request):
  
      serializer = TransactionSerializer(data=request.data, context={'request': request})
      if serializer.is_valid():  
          transaction = serializer.save() 
          return Response(TransactionSerializer(transaction).data, status=status.HTTP_201_CREATED)
      return Response(serializer.errors, status=status.HTTP_400_BAD_REQUEST)
  </code></pre>