From 2be6ae06399dbcc1a00af35b4e6a4f5185300e48 Mon Sep 17 00:00:00 2001 From: Jaume Martin Date: Wed, 12 Oct 2016 20:57:09 +0200 Subject: [PATCH] Update analytics.py self.app should be available in init_app as well, otherwise it will fail when calling source function. --- flask_analytics/analytics.py | 1 + 1 file changed, 1 insertion(+) diff --git a/flask_analytics/analytics.py b/flask_analytics/analytics.py index 2bbc9af..88dc17d 100644 --- a/flask_analytics/analytics.py +++ b/flask_analytics/analytics.py @@ -28,6 +28,7 @@ def __init__(self, app=None, disable_context_processor=False): self.init_app(app, not(disable_context_processor)) def init_app(self, app, context_processor): + self.app = app self.build_source(app.config) if context_processor: