use deleted=False instead of deleted=0 in queries

Mysql treats 0 and False as the same thing, but this isn't true for
postgresql which is much more strongly typed. Our whitebox testing
was failing on postgresql because of this assumption.

Change-Id: I1a7339814b1de6e0c5874ba5b56fc90db6fbb012
2 files changed