Skip to content

Commit d6f422f

Browse files
authored
fix NoneType when doing normal GET requests
this is to fix a bug where the plugin dies at line 104 if the api project does not define a "url" field
1 parent 9e8ade2 commit d6f422f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

flask_apidoc/apidoc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ def __send_api_file(self, file_name):
100100
api_project = self.__read_api_project()
101101

102102
new_url = request.url_root.strip('/')
103-
old_url = api_project.get('url')
103+
old_url = api_project.get('url', new_url)
104104
data = data.replace(old_url, new_url)
105105

106106
# creates a flask response to send

0 commit comments

Comments
 (0)