Skip to content

Commit

Permalink
fix: None does not implement middleware when no middlewares are regis…
Browse files Browse the repository at this point in the history
…tered
  • Loading branch information
mshebeko-twist committed Apr 18, 2023
1 parent d01c96f commit 17272a1
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,9 @@ def __init__(self, *args, **kwargs):

# inject trace middleware
self._middlewares_list = kwargs.pop("middleware", [])
if (self._middlewares_list is None):
self._middlewares_list = []

tracer_provider = otel_opts.pop("tracer_provider", None)
meter_provider = otel_opts.pop("meter_provider", None)
if not isinstance(self._middlewares_list, (list, tuple)):
Expand Down

0 comments on commit 17272a1

Please sign in to comment.