fix setting new related model just from dict with pkname

This commit is contained in:
collerek
2020-08-23 13:15:04 +02:00
parent 53384879a9
commit 806fe9b63e
4 changed files with 7 additions and 3 deletions

View File

@ -133,6 +133,8 @@ async def test_model_crud():
assert album1.pk == 1
assert album1.tracks is None
await Track.objects.create(album={"id": track.album.pk}, title="The Bird2", position=4)
@pytest.mark.asyncio
async def test_select_related():