2👍
✅
You need to instantiate/get_or_create Keyword
first:
keyword, _ = Keyword.objects.get_or_create(name='keyword_name')
case, flag = Case.objects.get_or_create(name='case_name', keywords=keyword)
Hope that works for you.
Source:stackexchange.com