Skip to content
This repository was archived by the owner on Aug 19, 2025. It is now read-only.

Conversation

@aminalaee
Copy link
Contributor

@aminalaee aminalaee commented Sep 23, 2021

Adds an update_or_create method the same way Django does:

note, created = await Note.objects.update_or_create(text="EXample", defaults={"completed": True})

Closes #54

@aminalaee aminalaee merged commit aba7907 into encode:master Sep 27, 2021
@aminalaee aminalaee deleted the update-or-create-method branch September 27, 2021 06:31
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add QuerySet-level convenience method: update_or_create

1 participant