Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignore fields does not work as expected #86

Closed
michaelsizonenko opened this issue Aug 7, 2020 · 3 comments · Fixed by #89
Closed

Ignore fields does not work as expected #86

michaelsizonenko opened this issue Aug 7, 2020 · 3 comments · Fixed by #89

Comments

@michaelsizonenko
Copy link

settings.py

"JSON_UNDERSCOREIZE": {
    # ...
    "ignore_fields": ("order_update", ),
    # ...
}

Still got output response:

{
"orderUpdate": {
"items": [
{
"parent": null,
"type": "tax",
"description": "Sales taxes",
"amount": 350,
"currency": "usd"
}
],
"shipping_methods": [
{
"id": "free_shipping",
"description": "Free 7-day shipping",
"amount": 0,
"currency": "usd",
"delivery_estimate": {
"type": "exact",
"date": "2020-08-11"
},
"tax_items": []
}
]
}
}

@stevewilliamsuk
Copy link

Agree, can reproduce the issue at will. However, the proposed fix may alter the problem.

@djowett-ftw
Copy link

#89 does (roughly) what I wanted, however I have to admit that ignore_fields was coded with a different intention - see this comment:

#80 (comment)

@JupiterThreads
Copy link

Is this ignore keys pr going to get added soon? I would also benefit from this as I'm trying to turn a field 'id' to '_id'. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants