You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The intent I'm trying to express in the schema is that I should NOT receive an empty list of nested OrderItemSchemas.
I find that in order for this to work, I must specify the if_missing=NoDefault keyword argument in addition to not_empty=True. It took me a long time to figure this out, since I assumed that passing not_empty=True to ForEach() would be sufficient.
Is this behavior intended? If so, could we document it better?
The text was updated successfully, but these errors were encountered:
camflint
changed the title
ForEach.not_empty attribute not intuitive; requires workaround
ForEach.not_empty attribute not intuitive; requires workaround
Dec 22, 2018
I have a custom schema that looks like the following.
The problematic line is this one:
The intent I'm trying to express in the schema is that I should NOT receive an empty list of nested
OrderItemSchema
s.I find that in order for this to work, I must specify the
if_missing=NoDefault
keyword argument in addition tonot_empty=True
. It took me a long time to figure this out, since I assumed that passingnot_empty=True
toForEach()
would be sufficient.Is this behavior intended? If so, could we document it better?
The text was updated successfully, but these errors were encountered: