`model.persisted` is a function, not a boolean attribute, so you would have to test

    model.persisted() is true

or just

    model.persisted()