1👍
✅
You should add it to the questionObj
, so a Questions
object, not the Questions
class:
questionObj.correctAnsRef.add(correctAnsObj)
Note: normally a Django model is given a singular name, so
Question
instead of.Questions
Source:stackexchange.com