Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New models are updating when they should be creating #311

Closed
josephmancuso opened this issue Jan 18, 2021 · 0 comments · Fixed by #312
Closed

New models are updating when they should be creating #311

josephmancuso opened this issue Jan 18, 2021 · 0 comments · Fixed by #312
Labels
bug An existing feature is not working as intended easy These issues are geared for people who have not yet contributed to this project yet

Comments

@josephmancuso
Copy link
Member

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

@josephmancuso josephmancuso added the bug An existing feature is not working as intended label Jan 18, 2021
@josephmancuso josephmancuso added the easy These issues are geared for people who have not yet contributed to this project yet label Jan 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An existing feature is not working as intended easy These issues are geared for people who have not yet contributed to this project yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant