nisnevich / discord-consensus-bot

A Discord bot for a consensus in decentralised organisations (e.g. DAO). Implements a lazy consensus and full consensus models.
MIT License
5 stars 4 forks source link

Add manual check for integer overflow before committing to DB #23

Closed nisnevich closed 1 year ago

nisnevich commented 1 year ago

!propose @Irina2610 11111111111111111111 Wir holen ab und fliegen zu den Malediven🍾

results in:

Traceback (most recent call last):
  File "/home/beta/eco-discord-lazy-consensus-bot/grant_proposal.py", line 145, in grant_proposal
    await add_grant_proposal(new_grant_proposal, db)
  File "/home/beta/eco-discord-lazy-consensus-bot/utils/grant_utils.py", line 134, in add_grant_proposal
    await db.add(new_grant_proposal)
  File "/home/beta/eco-discord-lazy-consensus-bot/utils/db_utils.py", line 68, in add
    DBUtil.session.commit()
...
OverflowError: Python int too large to convert to SQLite INTEGER