Other places in CKAN generally import `State` from `ckan.model` so it would be nice to keep this consistent. Something like:

    import ckan.model as model
    ...
    ...
    ...
    query = query.filter(model.User.state != model.State.DELETED)