Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions rest_framework_dataclasses/fields.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import collections.abc
from typing import Any, Dict, Generic, Type, TypeVar, Union, Optional
from typing import Any, Dict, Generic, Mapping, Type, TypeVar, Union, Optional

from django.core.exceptions import ImproperlyConfigured
from rest_framework.exceptions import ValidationError
Expand Down Expand Up @@ -80,7 +80,7 @@ class UnionField(Field, Generic[T]):
type_mapping: Dict[type, str]

def __init__(self,
child_fields: Dict[type, Union[Field, Type[Field]]],
child_fields: Mapping[type, Union[Field, Type[Field]]],
*,
nest_value: bool = False,
discriminator_field_name: Optional[str] = None,
Expand Down