disqus/django-bitfield

.filter(flags=Model.flags.flag1 & Model.flags.flag2) not working

MikeVL opened this issue · 2 comments

Model.flags.flag1 & Model.flags.flag2 is always equal zero

I can`t filter by two or more flags

& is a bitwise AND, so this will always return 0 when combining flags. I think you meant to use Model.flags.flag1 | Model.flags.flag2

This issue can be closed.

Thanks.