Skip to content

Commit 5dee5b4

Browse files
authored
Merge pull request #74 from hellupline/initialize-app
call self.init_app if Api was created with a app
2 parents 05b6754 + 070e33b commit 5dee5b4

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

flask_rest_jsonapi/api.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ def __init__(self, app=None, blueprint=None, decorators=None):
2626
self.resource_registry = []
2727
self.decorators = decorators or tuple()
2828

29+
if app is not None:
30+
self.init_app(app, blueprint)
31+
2932
def init_app(self, app=None, blueprint=None):
3033
"""Update flask application with our api
3134

0 commit comments

Comments
 (0)