Skip to content

0.38.1

Compare
Choose a tag to compare
@dantownsend dantownsend released this 26 Aug 06:31
· 634 commits to master since this release
bf280b1

Minor changes to get_or_create to make sure it handles joins correctly.

instance = (
    Band.objects()
    .get_or_create(
        (Band.name == "My new band")
        & (Band.manager.name == "Excellent manager")
    )
    .run_sync()
)

In this situation, there are two columns called 'name' - we need to make sure the correct value is applied if the row doesn't exist.