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

Fix Handler unregister #1050

Merged
merged 1 commit into from Nov 6, 2022
Merged

Fix Handler unregister #1050

merged 1 commit into from Nov 6, 2022

Conversation

butvinm
Copy link

@butvinm butvinm commented Oct 31, 2022

Add checking for handler_obj.handler

Description

At Handler unregister method variable registered was unused so removing handlers by handler function was did`t work. That fix add checking of handler_obj.handler.

Type of change

  • Bug fix

How has this been tested?

  • Register handler with dp.register_message_handler(some_func) and then call dp.messages_handler.unregister(some_func)

Test Configuration

-Python version: 3.9.1

Add checking for handler_obj.handler
@github-actions github-actions bot added the 2.x Issue or PR for stable 2.x version label Oct 31, 2022
@butvinm butvinm changed the title Fix Handler unregister Fix Handler unregister 🐛 Oct 31, 2022
@butvinm butvinm changed the title Fix Handler unregister 🐛 Fix Handler unregister Oct 31, 2022
@evgfilim1 evgfilim1 added the bug Something is wrong with the framework label Oct 31, 2022
Copy link
Contributor

@evgfilim1 evgfilim1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems valid and legit. Have you tested it?

@butvinm
Copy link
Author

butvinm commented Nov 1, 2022

Yes, at one of my projects. There are no so many points where it can break

@JrooTJunior JrooTJunior merged commit 19e97de into aiogram:dev-2.x Nov 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.x Issue or PR for stable 2.x version bug Something is wrong with the framework
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants