switch dict() to include relations comming from _iterate_related_models and not only nested not nullable ones

This commit is contained in:
collerek
2021-03-30 12:16:33 +02:00
parent 844ecae8f9
commit f0023773e3
5 changed files with 58 additions and 47 deletions

View File

@ -48,7 +48,11 @@ def test_read_main():
)
assert response.status_code == 200
assert response.json() == {
"category": {"id": None, "name": "test cat"},
"category": {
"id": None,
"items": [{"id": 1, "name": "test"}],
"name": "test cat",
},
"id": 1,
"name": "test",
}