use model class' query object only if it's present

sometimes it isn't present. the tests now pass.
use model class' query object in views as well

now the logic in `views._get_or_create` matches that in `search.QueryBuilder.create_query`