The filter_backends.py.FlexFieldsDocsFilterBackend.get_schema_fields() tries to concatenate the result of the _get_expandable_fields() as a string but the later returns a list. Therefore this results in a error:
File "/Users/erielias/miniconda3/envs/sr/lib/python3.8/site-packages/rest_flex_fields/filter_backends.py", line 109, in get_schema_fields example=(expandable_fields or "field1,field2,nested.field") + "," + WILDCARD_VALUES_JOINED, TypeError: can only concatenate list (not "str") to list
A possible fix that worked for me was simply replacing:
example=(expandable_fields or "field1,field2,nested.field") + "," + WILDCARD_VALUES_JOINED,
by
example=(",".join(expandable_fields) or "field1,field2,nested.field") + "," + WILDCARD_VALUES_JOINED,
Please let me know if that makes sense so I can create a Pull Request.
The filter_backends.py.FlexFieldsDocsFilterBackend.get_schema_fields() tries to concatenate the result of the _get_expandable_fields() as a string but the later returns a list. Therefore this results in a error:
File "/Users/erielias/miniconda3/envs/sr/lib/python3.8/site-packages/rest_flex_fields/filter_backends.py", line 109, in get_schema_fields example=(expandable_fields or "field1,field2,nested.field") + "," + WILDCARD_VALUES_JOINED, TypeError: can only concatenate list (not "str") to list
A possible fix that worked for me was simply replacing:
example=(expandable_fields or "field1,field2,nested.field") + "," + WILDCARD_VALUES_JOINED,
byexample=(",".join(expandable_fields) or "field1,field2,nested.field") + "," + WILDCARD_VALUES_JOINED,
Please let me know if that makes sense so I can create a Pull Request.
Thanks