Skip to content

Commit 481b923

Browse files
authored
Merge pull request #158 from viggo-devries/bugfix/context-reassign
This fixes a bug where context is reassigned if you pass an empty con…
2 parents 0ec48dd + e08ea5c commit 481b923

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/odin/mapping/__init__.py

+3-1
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)