You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When you new up a model that has no data inside it it is updating. These models should be creating.
For example, when you do something like this:
user=User()
user.name="bill"user.save()
It is currently doing an update. But failing because there is nothing to update. This should instead be doing an insert. We can check if the model is loaded or not loaded and either update or create
The text was updated successfully, but these errors were encountered:
When you new up a model that has no data inside it it is updating. These models should be creating.
For example, when you do something like this:
It is currently doing an update. But failing because there is nothing to update. This should instead be doing an insert. We can check if the model is loaded or not loaded and either update or create
The text was updated successfully, but these errors were encountered: