Skip to content

Commit c953d34

Browse files
schema.py: Fix for get_nested_fields
Having a list field on schema is giving an error after upgrading to the latest version. The get_nested_fields function is trying to access an attribute 'container' on a list field, which as per latest marshmallow version does not exist. So replacing it with a new field called 'inner'.
1 parent a4ff3f4 commit c953d34

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

flask_rest_jsonapi/schema.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ def get_nested_fields(schema, model_field=False):
106106

107107
nested_fields = []
108108
for (key, value) in schema._declared_fields.items():
109-
if isinstance(value, List) and isinstance(value.container, Nested):
109+
if isinstance(value, List) and isinstance(value.inner, Nested):
110110
nested_fields.append(key)
111111
elif isinstance(value, Nested):
112112
nested_fields.append(key)

0 commit comments

Comments
 (0)