Flake8 error `E712 comparison to True should be 'if cond is True:' or 'if cond:'` in django
use "is" instead of "=="
I try to manage if condition in Django.
It's working fine but getting an error when trying to check with flake8
flake8 data/view.py
My condition like this:
if user.item.purchase.status == True:
Here user, item and purchase is model and status is a field of purchase. 
and Status have Three values 1)Undefine 2)True 3)False

I'm doing something wrong?

Flake8 error E712 comparison to True should be 'if cond is True:' or 'if cond:'
Thanks in advance