Your database query doesn’t return a result of the query, it returns the query itself. This is always true when checked.
You forgot to add a function like .first()
or .all()
to the query.
join = Join.query.filter_by(clubId=id, userId=current_user.id).first()
CLICK HERE to find out more related problems solutions.