Fixed inverse logic error

Updating the model when it already exists and create a new one if it doesn't.
Merge pull request #2100 from peaceman/4.0

Inverse logic error in the model update method