Skip to content

Commit ad6a14d

Browse files
committed
Set a default value for MarshmallowInputSchema's context
This is a lazy fix to a test, without fully understanding the codebase. It looks like context *should* be provided when needed, I'm not quite sure why it isn't being.
1 parent 091488d commit ad6a14d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

hug/types.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -668,7 +668,7 @@ def __init__(self, schema):
668668
def __doc__(self):
669669
return self.schema.__doc__ or self.schema.__class__.__name__
670670

671-
def __call__(self, value, context):
671+
def __call__(self, value, context=None):
672672
self.schema.context = context
673673
# In marshmallow 2 schemas return tuple (`data`, `errors`) upon loading. They might also raise on invalid data
674674
# if configured so, but will still return a tuple.

0 commit comments

Comments
 (0)