Why django bulk_create returns objects without pk?
In [1]: item_list = [Model(title=str(i)) for i in range(10)] In [2]: objs = Model.objects.bulk_create(item_list) In [3]: print(objs[0].pk) None
As a result, objs == item_list
What is the point of this?
I mean, this method can return the result of the operation (True or False or someting else), and not this useless set of objects that I already have.
source share