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

Fix 'undefined' and 'null' being returned by the frontend #959

Merged
merged 3 commits into from Jun 4, 2021

Conversation

antonioribeiro
Copy link
Member

@antonioribeiro antonioribeiro commented Jun 4, 2021

We bumped into this bug today, with @luislavena, so this is a hot fix, as the source of this problem is the frontend.

Locally it all was working fine but when when we deployed to a staging server the frontend was able to upload the file to S3 but when POSTing to our backend it it was alternately sending null and undefined in the property media_to_replace_id, generating the error seen on this issue.

I believe is_numeric covers all possibilities, unless users are using UUIDs as Twill database keys, which seems like very edge cases.

Closes #957.

@antonioribeiro antonioribeiro added the type: bug Something isn't working label Jun 4, 2021
ifox
ifox previously approved these changes Jun 4, 2021
@ifox ifox merged commit 55e3574 into area17:2.x Jun 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

shouldReplaceMedia still process $id == null
2 participants