Skip to content

Commit

Permalink
Convert numeral settings to bool
Browse files Browse the repository at this point in the history
  • Loading branch information
geirawsm committed Nov 20, 2024
1 parent d2eb0a8 commit 038b836
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions sausage_bot/cogs/stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -959,6 +959,14 @@ async def setup(bot):
template_info=envs.stats_settings_db_schema,
cols_remove=old_value_check_or_help
)
if old_value_numeral_instead_of_bool_status:
log.verbose('Converting old value numeral to bool')
for setting in new_bool_status:
await db_helper.update_fields(
template_info=envs.stats_settings_db_schema,
where=('setting', setting),
updates=('value', new_bool_status[setting])
)
log.verbose('Registering cog to bot')
await bot.add_cog(Stats(bot))

Expand Down

0 comments on commit 038b836

Please sign in to comment.