From a4df0fbb397e13bd7c6475dbde5f44727474c3c7 Mon Sep 17 00:00:00 2001 From: Adrian Date: Tue, 2 Feb 2016 16:16:01 +0100 Subject: [PATCH] Add missing return to g.setdefault --- flask/ctx.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flask/ctx.py b/flask/ctx.py index 1e01df78..3401bd79 100644 --- a/flask/ctx.py +++ b/flask/ctx.py @@ -36,7 +36,7 @@ class _AppCtxGlobals(object): return self.__dict__.pop(name, default) def setdefault(self, name, default=None): - self.__dict__.setdefault(name, default) + return self.__dict__.setdefault(name, default) def __contains__(self, item): return item in self.__dict__