[Fixed]-Django aggregate, use of AND/OR operators in when condition

1👍

According to the docs you have to use Q objects when using complex conditions (just like you did in filter). An example:

When(Q(name__startswith="John") | Q(name__startswith="Paul"), then='name')

Leave a comment