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

BoardGetTopics - поле default_order возвращает number вместо integer #48

Open
SevereCloud opened this issue Jul 18, 2019 · 0 comments
Labels
vk bug Error on the side of vk

Comments

@SevereCloud
Copy link
Owner

SevereCloud commented Jul 18, 2019

https://vk.com/bug136682

Шаги воспроизведения:

  1. Запросить board.getTopics c параметрами group_id=1 и topic_id=21972169

P.S. Даже не пытайтесь запросить через vk.com/dev - там нули обрезаются

Фактический результат:

"default_order": 2.000000,

Ожидаемый результат:

"default_order": 2,

Временный костыль - вместо int использовать float64

vksdk/5.92/api/board.go

Lines 136 to 141 in bfb81aa

type BoardGetTopicsResponse struct {
Count int `json:"count"`
Items []object.BoardTopic `json:"items"`
DefaultOrder float64 `json:"default_order"` // BUG(VK): default_order int
CanAddTopics int `json:"can_add_topics"`
}

@SevereCloud SevereCloud added the vk bug Error on the side of vk label Jul 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
vk bug Error on the side of vk
Projects
None yet
Development

No branches or pull requests

1 participant