0๐
I think you must have null=True
in your model definition for email. So, the easiest way to fix this is to delete that null=True
, migrate then try again. Thus, if email is None, it will be ''
instead of None
, then F() will work.
Another way is to use the Q() query, but it will cost in Python memory.
๐คzhaochy
Source:stackexchange.com