Thanks for pasting the traceback, this looks like its a database type issue.
This works for mysql because 0 is equivalent to false but postgres this is not the case and we need to cast it to work in this case.
Thanks for pasting the traceback, this looks like its a database type issue.
This works for mysql because 0 is equivalent to false but postgres this is not the case and we need to cast it to work in this case.