tortoise / tortoise-orm

Familiar asyncio ORM for python, built with relations in mind
https://tortoise.github.io
Apache License 2.0
4.38k stars 356 forks source link

fix: bulk_update when using models with custom fields #1564

Closed privatwolke closed 2 months ago

privatwolke commented 3 months ago

Description

Motivation and Context

This change allows bulk_update usage also with models that use custom fields.

How Has This Been Tested?

A test has been added which fails on the latest state of the develop branch. After applying the changes from this PR, the test passes as expected.

Checklist:

abondar commented 2 months ago

Hi!

Could you please rebase it on current develop branch?

privatwolke commented 2 months ago

@abondar done

abondar commented 2 months ago

Sorry, there were some changes to changelog, could you rebase one more time and move your changelog to 0.21.0 section?

privatwolke commented 2 months ago

@abondar should be good now

abondar commented 2 months ago
black --check tortoise/ examples/ tests/ conftest.py || (echo "Please run 'make style' to auto-fix style issues" && false)
would reformat /home/runner/work/tortoise-orm/tortoise-orm/tests/test_update.py
would reformat /home/runner/work/tortoise-orm/tortoise-orm/tortoise/queryset.py

Oh no! 💥 💔 💥
2 files would be reformatted, 246 files would be left unchanged.

Please use make style and check it with make lint to ensure style

privatwolke commented 2 months ago

@abondar fixed up codestyle ✨

coveralls commented 2 months ago

Pull Request Test Coverage Report for Build 8878304565

Details


Totals Coverage Status
Change from base Build 8865405243: 0.0%
Covered Lines: 5771
Relevant Lines: 6467

💛 - Coveralls