Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Initialization Issue with Api Class When Using init_app #972

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

menglutao
Copy link

@menglutao menglutao commented Dec 27, 2023

Problem Description

Currently, when a user creates an Api instance without passing the app argument (i.e., api = Api()), and later initializes it with api.init_app(app), the app is not set correctly. This issue arises because self.app is not set in init_app, but only in init.

Proposed Changes

I propose a change in the Api class where self.app = app is moved from the init method to the init_app method.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant