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

Batch update to furniture in runs breaks Date/Timestamp objects #74

Closed
kungpaogao opened this issue Jul 30, 2020 · 4 comments
Closed

Batch update to furniture in runs breaks Date/Timestamp objects #74

kungpaogao opened this issue Jul 30, 2020 · 4 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@kungpaogao
Copy link
Member

Our batch update function doesn't work well for Timestamp and Dates and results in dates being stored as objects in Firestore. This causes issues on the frontend.

This is related to the recent PR #72, and it was not caught while testing.

Malformed data in Firestore

image

Frontend error

image

@kungpaogao kungpaogao added the bug Something isn't working label Jul 30, 2020
@kungpaogao kungpaogao added this to the MVP milestone Jul 30, 2020
@kungpaogao
Copy link
Member Author

This has to do with how firestore.Timestamp is handled in our functions. I think the solution is to convert Timestamp to Date immediately on get.

@kungpaogao
Copy link
Member Author

Our nested update function works fine with Date objects: Playground Link

kungpaogao added a commit that referenced this issue Aug 4, 2020
- change Timing properties back to Date type
- add a converter toDate() - not sure if necessary
- use converter in bind actions
- update mock data
@kungpaogao
Copy link
Member Author

I think I fixed this in the commit, but I don't know which change was the one that did the trick. It could be that the data was malformed from the sample data that was pushed.

@kungpaogao kungpaogao self-assigned this Aug 4, 2020
@kungpaogao
Copy link
Member Author

Should be resolved with a25bf30, which was merged with #78.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant