Skip to content
This repository has been archived by the owner on Jul 30, 2024. It is now read-only.

slight refactor of Security.__getattr__ to avoid recussion when not initialized with app #339

Closed
wants to merge 1 commit into from

Conversation

eriktaubeneck
Copy link

If you use the factory method for creating at app and call security.init_app(app) directly after security is initialized, calling security.anything (I ran into it with security.login_context_processor) ends up with an endless recursion since security._state is never set. This slight changes fixes this, but requires that attributes be accessed within an app context when they are registered this way (which is the only way I think it could work, if we are able to register with multiple apps).

@eriktaubeneck
Copy link
Author

Hmm, I'm going to close this as it doesn't seem to solve the problem. Using these decorators can't happen inside an app context.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.01%) when pulling db09e29 on eriktaubeneck:develop into c7d0ea9 on mattupstate:develop.

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

Successfully merging this pull request may close these issues.

2 participants