Skip to content
This repository was archived by the owner on Feb 7, 2026. It is now read-only.

Fix a bug which returns KeyError when modifying user level#311

Merged
notsniped merged 1 commit intomainfrom
levelling-db-patch
Oct 15, 2023
Merged

Fix a bug which returns KeyError when modifying user level#311
notsniped merged 1 commit intomainfrom
levelling-db-patch

Conversation

@notsniped
Copy link
Member

Problem

When the levelling db library attempts to add or remove levels from a user (through framework), it ends up failing and returning a KeyError exception.

Reason

This was because in the levelling db library, the add_levels() and remove_levels() methods were attempting to modify the levels value (non-existant) instead of the level value (actual key name).

Conclusion

This patch aims at resolving this issue and providing a bug-free user experience.

When the levelling db library attempts to add or remove levels from a user (through framework), it ends up failing and returning a `KeyError` exception.

This was because in the levelling db library, the `add_levels()` and `remove_levels()` methods were attempting to modify the `levels` value (non-existant) instead of the `level` value (actual key name).

This patch aims at resolving this issue.
@notsniped notsniped added priority:critical area:storage Changes made to the systems required for storing, modifying and accessing of user data. area:levelling Any updates, changes, or removals to the levelling system type:patch Bug fixes for the bot and/or it's commands area:framework Any changes to the NKA Framework for isobot labels Oct 15, 2023
@notsniped notsniped self-assigned this Oct 15, 2023
@notsniped notsniped merged commit 541b66b into main Oct 15, 2023
@notsniped notsniped deleted the levelling-db-patch branch October 15, 2023 16:15
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area:framework Any changes to the NKA Framework for isobot area:levelling Any updates, changes, or removals to the levelling system area:storage Changes made to the systems required for storing, modifying and accessing of user data. priority:critical size/XS type:patch Bug fixes for the bot and/or it's commands

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant