I have a query like
User.objects.annotate(
x=Value(False, output_field=BooleanField()),
y=Value(True, output_field=BooleanField())
).annotate(
z=F('x').bitor(F('y')) # HOW TO DO THIS?
).values('z')
which works with SQLite but not with PostgreSQL. The error is
LINE 1: SELECT (false | true) AS "z" FROM "auth_user" LIMIT 21
^
HINT: No operator matches the given name and argument types. You might need to add explicit type casts.
How should I implement the logical OR on annotated fields that works consistently?
Thank you.