1👍
✅
You need to call the .exists()
method, so:
if post.like_page_post.filter(id=request.user.id).exists():
# …
Source:stackexchange.com