I'm getting a sytax error for the following statement, the problem section being (Player.name == data["name"]) | (Player.account == data["account"]))
:
player_from_db = db.session.execute(select(Player).where((Player.name == data["name"]) | (Player.account == data["account"]))).scalar()
This is the error:
Expected type 'Union[ColumnElement[bool], _HasClauseElement, SQLCoreOperations[bool], ExpressionElementRole[bool], () -> ColumnElement[bool], LambdaElement]', got 'Union[bool, int]' instead
But the clause clearly has two bool expressions. Help appreciated!