Fix add_field_serializer_for_reverse_relations clearing validators (#1302)
* Fix add_field_serializer_for_reverse_relations clearing validators * add test to check that validators are not removed * compatibility with old python * fix test default values * fix coverage and cleanup --------- Co-authored-by: collerek <collerek@gmail.com>
This commit is contained in:
@ -97,7 +97,25 @@ async def test_related_with_defaults(sample_data):
|
||||
"year": 2021,
|
||||
}
|
||||
],
|
||||
"country": {"authors": [{"id": 1}], "id": 1},
|
||||
"country": {
|
||||
"authors": [
|
||||
{
|
||||
"books": [
|
||||
{
|
||||
"author": {"id": 1},
|
||||
"id": 1,
|
||||
"title": "Bug caused by " "default value",
|
||||
"year": 2021,
|
||||
}
|
||||
],
|
||||
"country": {"id": 1},
|
||||
"id": 1,
|
||||
"name": "bug",
|
||||
"rating": 5,
|
||||
}
|
||||
],
|
||||
"id": 1,
|
||||
},
|
||||
"id": 1,
|
||||
"name": "bug",
|
||||
"rating": 5,
|
||||
|
||||
Reference in New Issue
Block a user