Skip to content

Commit

Permalink
Skip static rules
Browse files Browse the repository at this point in the history
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
  • Loading branch information
KyleJamesWalker committed Mar 23, 2022
1 parent de6f5ad commit 21f90a7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions flask_apispec/extension.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,10 @@ def register_existing_resources(self):
except ValueError:
blueprint_name = None

# Skip static rules
if name == 'static':
continue

try:
self.register(rule, blueprint=blueprint_name)
except TypeError:
Expand Down

0 comments on commit 21f90a7

Please sign in to comment.