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

JSON field getting cleared on save #215

Closed
srgoldman opened this issue Jun 24, 2020 · 4 comments · Fixed by #216
Closed

JSON field getting cleared on save #215

srgoldman opened this issue Jun 24, 2020 · 4 comments · Fixed by #216

Comments

@srgoldman
Copy link

srgoldman commented Jun 24, 2020

Simply retrieving the entry and saving it without any changes clears one of the Object fields (but not the others).

space_id = 'a1kd6145ijia'
environment_id = 'staging'
token = CONTENTFUL_MANAGEMENT_TOKEN
client = Contentful::Management::Client.new(token, max_rate_limit_retries: 2)
environment = client.environments(space_id).find(environment_id)
entry = environment.entries.find('2Yd9Uk4GbY2kejDs9QWdNQ')
entry.values # [["XXS", "00-0", "31-32\"", "23-24\"", "33-34\""], ["XS", "0-2", "33-34\"", "25-26\"", "35-36 1/2\""], ["S", "4-6", "35-36\"", "27-28\"", "37-38 1/2\""], ["M", "8-10", "37-38\"", "29-31\"", "39-41\""], ["L", "12-14", "39-40\"", "32-35\"", "42-45\""], ["XL", "16", "41-44\"", "36-39\"", "46-49\""], ["2XL", "18", "45-48\"", "40-43\"", "50-52\""]]
entry.save # didn't make any changes
entry.values # []
@dlitvakb
Copy link
Contributor

dlitvakb commented Jul 2, 2020

Hey @srgoldman,

I'll take a look and let you know what I find.

Cheers

@dlitvakb
Copy link
Contributor

dlitvakb commented Jul 2, 2020

Managed to reproduce, looking for a fix.

@dlitvakb
Copy link
Contributor

dlitvakb commented Jul 2, 2020

Found the issue, working on it.

@srgoldman
Copy link
Author

Awesome! 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.

2 participants