Merge "Use bool instead of int for boolean filter value"

This commit is contained in:
Zuul 2018-02-14 21:34:14 +00:00 committed by Gerrit Code Review
commit 0468af9895

View File

@ -1469,9 +1469,9 @@ def _task_soft_delete(context, session=None):
query = session.query(models.Task)
query = (query.filter(models.Task.owner == context.owner)
.filter_by(deleted=0)
.filter_by(deleted=False)
.filter(expires_at <= timeutils.utcnow()))
values = {'deleted': 1, 'deleted_at': timeutils.utcnow()}
values = {'deleted': True, 'deleted_at': timeutils.utcnow()}
with session.begin():
query.update(values)