Skip to content

Commit 21f90a7

Browse files
Skip static rules
When using Flask 2x the send_static_file function is a lambda and crashes the extraction of the rules_by_endpoint function. There is currently a PR that has a fix but it's been stale so I'm adding this as a possible alternate fix. The other fix is: jmcarp#230
1 parent de6f5ad commit 21f90a7

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

flask_apispec/extension.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,10 @@ def register_existing_resources(self):
103103
except ValueError:
104104
blueprint_name = None
105105

106+
# Skip static rules
107+
if name == 'static':
108+
continue
109+
106110
try:
107111
self.register(rule, blueprint=blueprint_name)
108112
except TypeError:

0 commit comments

Comments
 (0)