[Fixed]-ManyToMany field as an argument to .objects.create() function

1👍

It’s not possible to add a ManytoManyField in create because ManyToManyFields involve intermediate tables for database queries.

You’ll need two queries for it:

order=Order.objects.create(customer=customer, date=now, number=number)
order.design.add(design)

Leave a comment