'Save and return a list of object instances.'

def save(self, **kwargs):

    assert (u'commit' not in kwargs), u"'commit'    is    not    a    valid    keyword    argument    to    the    'save()'    method.    If    you    need    to    access    data    before    committing    to    the    database    then    inspect    'serializer.validated_data'    instead.    You    can    also    pass    additional    keyword    arguments    to    'save()'    if    you    need    to    set    extra    attributes    on    the    saved    model    instance.    For    example:    'serializer.save(owner=request.user)'.'"
    validated_data = [dict((list(attrs.items()) + list(kwargs.items()))) for attrs in self.validated_data]
    if (self.instance is not None):
        self.instance = self.update(self.instance, validated_data)
        assert (self.instance is not None), u'`update()`    did    not    return    an    object    instance.'
    else:
        self.instance = self.create(validated_data)
        assert (self.instance is not None), u'`create()`    did    not    return    an    object    instance.'
    return self.instance
