Skip to content

Commit

Permalink
Fixed critical issue that lead to deletion of non-empty domain router
Browse files Browse the repository at this point in the history
+ Upgraded version to 1.3.0 & added version constant
  • Loading branch information
bitrate16 committed Apr 11, 2022
1 parent 840e4c9 commit 0ac6d94
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions aiohttp_dynamic/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,5 @@
# import public classes
from .routing import AbstractPathRouter, PlainPathRouter, DynamicPathRouter, DomainRouter, DynamicRouter, Handler
from .middlewares import DynamicMiddleware

VERSION = '1.3.0'
2 changes: 1 addition & 1 deletion aiohttp_dynamic/routing.py
Original file line number Diff line number Diff line change
Expand Up @@ -881,7 +881,7 @@ def del_handler(self, method: str, path: str, domain: str = '*') -> bool:
domain_router.del_router(path)

# Try to remove empty domain router
if len(domain_router.routes):
if len(domain_router.routes) == 0:
self.del_domain(domain)

return True
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
setup(
name = 'aiohttp_dynamic',
packages = ['aiohttp_dynamic'],
version = '1.2.0',
version = '1.3.0',
license='Apache License 2.0',
description = 'aiohttp extension for creating and modifying dynamic routes in runtime',
author = 'bitrate16',
Expand Down

0 comments on commit 0ac6d94

Please sign in to comment.