dot-notation not working
See original GitHub issueBased on https://github.com/rsinger86/drf-flex-fields#dynamically-setting-fields,
Here are my serializers:
class AddressBookSerializer(FlexFieldsModelSerializer):
class Meta:
model = SellerAddressBook
fields = ('id', 'address', 'city', 'state', )
class OrderSerializer(FlexFieldsModelSerializer):
address = AddressBookSerializer(many=False)
class Meta:
model = Order
fields = ('id', 'order_name', 'address',)
On Get,
/orders/123/?fields=id,order_name,address.city
ACTUAL RESULT
{
"id" : 123
"order_name" : "Order Name",
"address" : {
"id" : "1",
"address": "my add",
"city": "my_city",
"state": " my state"
}
EXPECTED RESULT
{
"id" : 13322
"order_name" : "Order Name",
"address" : {
"city": "my_city"
}
Issue Analytics
- State:
- Created 6 years ago
- Reactions:3
- Comments:7 (2 by maintainers)
Top Results From Across the Web
Testing Objects for Properties dot notation not working
Tell us what's happening: This code works, but I don't know why dot notation doesn't work in this instance. Can anyone explain?
Read more >JavaScript property access: dot notation vs. brackets?
Dot notation does not work with some keywords (like new and class ) in internet explorer 8. I had this code: //app.users is...
Read more >JavaScript Dot Notation vs. Bracket Notation: Which to Use ...
Dot notation is faster to write and easier to read than bracket notation. However, you can use variables with bracket notation, but not...
Read more >JS dot-notation vs. bracket notation | by code_thoughts - Medium
Dot notation only lets you access the explicit key name of a property. You can't use dot notation with variables (or numbers either)....
Read more >Dot notation not working on this simple list of text
Hi Appian community,. Please could I get your help on a data issue with an integration I have made? For simplicity's sake, this...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@rsinger86 this is something I need. I will gladly work up a PR, but could you please give me some guidance on the best way to implement it?
Everybody wants it but nobody what to do anything 😄