Skip to content

0.38.0

Choose a tag to compare

@dantownsend dantownsend released this 25 Aug 22:22
· 751 commits to master since this release

get_or_create now supports more complex where clauses. For example:

  row = await Band.objects().get_or_create(
      (Band.name == 'Pythonistas') & (Band.popularity == 1000)
  ).run()

And you can find out whether the row was created or not using row._was_created.

Thanks to @wmshort for reporting this issue.