Fix bug caused by passing model object instead of constant.

My previous update incorrectly passed a model object to the query initializer instead of a constant.