How to batch add? many-to-many fields by Django

ValueError: "< OrderShipping: OS-180623085540 >" needs to have a value for field "id" before this many-to-many relationship can be used.
class OrderGoodsInfo(models.Model):
    ...
....
class OrderShipping(models.Model):
    order = models.ManyToManyField(OrderGoodsInfo, blank=True, verbose_name="ID")
....

views.py

container_orders_id = [] 
for order in container_obj.orders.all():
    container_orders_id.append(order.id)
order_goods = OrderGoodsInfo.objects.filter(id__in=container_orders_id)
order_shipping = OrderShipping(user=request.user)
form = OrdershippingForm(request.POST, instance=order_shipping) 
if form.is_valid():
   osp = form.save(commit=False)
   osp.order.add(*order_goods)
   osp.save()
Mar.21,2021

osp = form.save(commit=True)
osp.order.add(*order_goods) 
-sharp osp.save()

M2m relationships can be added only if both sides exist in the database

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3967e-2c189.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3967e-2c189.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?