Skip to content

Commit

Permalink
fix: avoid missing websocket attribute if werkzeug < v1 (#407)
Browse files Browse the repository at this point in the history
Signed-off-by: Keming <kemingy94@gmail.com>
  • Loading branch information
kemingy authored Mar 4, 2025
1 parent 68585d2 commit f4b8306
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion spectree/plugins/flask_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def find_routes(self):
continue
if rule.endpoint.startswith("openapi"):
continue
if rule.websocket:
if getattr(rule, "websocket", False):
continue
if (
self.blueprint_state
Expand Down
2 changes: 1 addition & 1 deletion spectree/plugins/quart_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def find_routes(self):
continue
if rule.endpoint.startswith("openapi"):
continue
if rule.websocket:
if getattr(rule, "websocket", False):
continue
if (
self.blueprint_state
Expand Down

0 comments on commit f4b8306

Please sign in to comment.