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

Chore: fix experimental QueryData map initalizers #921

Merged
merged 4 commits into from
Mar 11, 2024
Merged

Conversation

ryantxu
Copy link
Member

@ryantxu ryantxu commented Mar 8, 2024

#897 ignores the complex values when setting values via map. This fixes that error

@ryantxu ryantxu added the bug Something isn't working label Mar 8, 2024
@ryantxu ryantxu requested review from a team as code owners March 8, 2024 05:59
@ryantxu ryantxu requested review from wbrowne, andresmgot, oshirohugo and toddtreece and removed request for a team March 8, 2024 05:59
_ = json.Unmarshal(body, &g.TimeRange)
}
case "datasource":
body, err := json.Marshal(val)
if err != nil {
if err == nil {
_ = json.Unmarshal(body, &g.Datasource)
Copy link
Member

@toddtreece toddtreece Mar 8, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should these unmarshal errors be handled/logged?

Comment on lines 233 to 236
ii, ok := v.(int)
if ok {
return float64(ii), nil
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is already covered in the lines just above

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dooh -- thanks

@ryantxu ryantxu requested a review from toddtreece March 11, 2024 23:29
@ryantxu ryantxu merged commit 07c6088 into main Mar 11, 2024
3 checks passed
@ryantxu ryantxu deleted the fix-map-setters branch March 11, 2024 23:52
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

Successfully merging this pull request may close these issues.

3 participants