Skip to content

Add return_model to bulk_upsert #78

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

Merged

Conversation

xavierdutreilh
Copy link
Contributor

bulk_insert accepts a return_model parameter to be set to True if the result to be returned should be a list of model instances (and not a list of dictionaries). However, the two bulk_upsert methods defined in the managers module do not accept this parameter. So, the result is always a list of dictionaries and it is not possible to request a list of model instances.

As a result, this pull request intends to change that by exposing a return_model parameter on the bulk_upsert methods and pass it all the way to bulk_insert.

@Photonios Photonios merged commit 96ccf18 into SectorLabs:master May 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants