title: Django rest framework serializer.save() return "Invalid data. Expected a dictionary, but got group"
body: <p>I am trying to call serlizerer to save object from viewset
  This is views.py</p>
  
  <pre><code>class GroupViewSet(viewsets.ViewSet):
          ....
          @detail_route(methods=['post'], url_path='task')
          def get_task(self, request, pk=None):
              group = get_object_or_404(Group, pk=pk)
              data = {"group": group }
              log_serializer = LogSerializer(data=data)
              if log_serializer.is_valid(raise_exception=True):
                  log_serializer.save()
  </code></pre>
  
  <p>This is serializer.py</p>
  
  <pre><code>class GroupSerializer(serializers.ModelSerializer):
      class Meta:
          model = Group
          fields = ('id', 'name')
  
  class LogSerializer(serializers.ModelSerializer):
      group = GroupSerializer()
      class Meta:
          model = Log
          fields = ('group', 'created')
  </code></pre>
  
  <p>This is the model.py:</p>
  
  <pre><code>class Group:
  ....
  
  class Log(models.Model):
      user = models.ForeignKey(User)
      group = models.ForeignKey(Server) #Not the group of user , it is the group id which user try to query 
      created = models.DateTimeField(auto_now_add=True)
  </code></pre>
  
  <p>The post responese;</p>
  
  <pre><code>{
      "group": {
          "non_field_errors": [
              "Invalid data. Expected a dictionary, but got group."
          ]
      }
  }
  </code></pre>