1👍
✅
To remove all objects from the related object, use clear()
(Django Docs) method:
form.instance.participants.clear()
Note that
add()
,create()
,remove()
,clear()
, andset()
all
apply database changes immediately for all types of related fields. In
other words, there is no need to call save() on either end of the
relationship.
👤NKSM
- [Answered ]-How to pass the customer id dynamically in the tap payment method to save the card value
Source:stackexchange.com