mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
Patch 2 (#977)
* Fix filtering skip_patterns * cache skip actions * fix item' is not defined, add tests
This commit is contained in:
parent
d5654068b1
commit
c43ff9b6f9
2 changed files with 59 additions and 5 deletions
|
|
@ -117,11 +117,12 @@ class LifetimeControllerMiddleware(BaseMiddleware):
|
|||
if self._skip_actions is None:
|
||||
self._skip_actions = []
|
||||
if self.skip_patterns:
|
||||
self._skip_actions.extend([
|
||||
f"pre_process_{item}",
|
||||
f"process_{item}",
|
||||
f"post_process_{item}",
|
||||
])
|
||||
for item in self.skip_patterns:
|
||||
self._skip_actions.extend([
|
||||
f"pre_process_{item}",
|
||||
f"process_{item}",
|
||||
f"post_process_{item}",
|
||||
])
|
||||
return self._skip_actions
|
||||
|
||||
async def pre_process(self, obj, data, *args):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue