From 0384cfd955d4fe0ec607c883da0c4b15ae4c137e Mon Sep 17 00:00:00 2001 From: Manuel Saelices Date: Tue, 24 Nov 2015 10:17:36 +0100 Subject: [PATCH] Avoid errors when doing migrate command --- silk/middleware.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/silk/middleware.py b/silk/middleware.py index bb0c9649..189e44c4 100644 --- a/silk/middleware.py +++ b/silk/middleware.py @@ -28,7 +28,7 @@ def silky_reverse(name, *args, **kwargs): return r -fpath = silky_reverse('summary') +get_fpath = lambda: silky_reverse('summary') config = SilkyConfig() @@ -43,7 +43,7 @@ def _should_intercept(request): if random.random() > config.SILKY_INTERCEPT_PERCENT / 100.0: return False - silky = request.path.startswith(fpath) + silky = request.path.startswith(get_fpath()) ignored = request.path in config.SILKY_IGNORE_PATHS return not (silky or ignored)