Merge branch 'master' of https://github.com/collerek/ormar into get_pydantic

This commit is contained in:
collerek
2021-06-02 08:56:29 +02:00
2 changed files with 11 additions and 2 deletions

View File

@ -68,6 +68,13 @@ async def test_is_null():
assert tolkien.books[0].year is None
assert tolkien.books[0].title == "The Hobbit"
tolkien = await Author.objects.select_related("books").paginate(1, 10).get(
books__year__isnull=True
)
assert len(tolkien.books) == 1
assert tolkien.books[0].year is None
assert tolkien.books[0].title == "The Hobbit"
tolkien = await Author.objects.select_related("books").get(
books__year__isnull=False
)