Skip to content

Commit e08ea5c

Browse files
committed
This fixes a bug where context is reassigned if you pass an empty context dict to .apply
1 parent 3cfaa5b commit e08ea5c

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/odin/mapping/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -515,7 +515,9 @@ def apply(
515515
specified is returned.
516516
517517
"""
518-
context = context or {}
518+
if context is None:
519+
context = {}
520+
519521
mapping_result = mapping_result or cls.default_mapping_result
520522
context.setdefault("_loop_idx", [])
521523

0 commit comments

Comments
 (0)