2👍
✅
You need to check membership of the key in the QueryDict
, not in the method of the QueryDict.
The following line:
'trackid' in request.POST.getlist
should be replaced with:
'trackid' in request.POST
Source:stackexchange.com