We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c632953 commit c405100Copy full SHA for c405100
1 file changed
src/odin/mapping/__init__.py
@@ -501,7 +501,7 @@ def apply(
501
source_obj,
502
context=None,
503
allow_subclass: bool = False,
504
- mapping_result: MappingResult = None,
+ mapping_result: Type[MappingResult] = None,
505
):
506
"""
507
Apply conversion either a single resource or a list of resources using the mapping defined by this class.
@@ -621,11 +621,13 @@ def _apply_rule(self, mapping_rule):
621
except TypeError as ex:
622
raise MappingExecutionError(
623
f"{ex} applying rule {mapping_rule}"
624
- ) from None
+ ) from ex
625
626
if to_list:
627
if isinstance(to_values, Iterable):
628
to_values = (list(to_values),)
629
+ else:
630
+ to_values = (to_values,)
631
else:
632
to_values = force_tuple(to_values)
633
0 commit comments