deta / deta-python

deta's official sdk
https://deta.space/docs/en/build/reference/sdk/base
MIT License
153 stars 25 forks source link

Deta is storing the wrong int #62

Closed eeriemyxi closed 2 years ago

eeriemyxi commented 2 years ago
        await inter.response.defer()
        print(channel.id)
        await self.db.put(channel.id, "v_channel")

it prints, 921301271112187924 but what it stores in the database is, 921301271112187900

aavshr commented 2 years ago

hi @m-y-x-i , this behavior is because of this: https://docs.deta.sh/docs/base/sdk#storing-numbers

Please, store large ints as strings.