Closed bthorben closed 7 years ago
I just tried this by adding the following two lines toexamples/settings.py
(to run with examples/sqla_example.py
:
DOMAIN['invoices']['schema']['people']['data_relation']['embeddable'] = True
DOMAIN['invoices']['embedded_fields'] = ['people']
You most likely forgot to set embeddable = True
on the field you want to embed, see http://python-eve.org/features.html#embedded-resource-serialization.
Steps to reproduce
resource_settings['embedded_fields'] = ['related_item']
Actual result 'related_item' is not embedded
Expected result 'related_item' is embedded as if the request contained
?embedded={"related_item": 1}
Note Actually using
?embedded={"related_item": 1}
works as expected. It seems likefine_one
is responsible for loading embedded objects and only takes into account embedding via the request, not the configuration.