Only use data for preemptive caching from plugins if it's set

This commit is contained in:
Gina Häußge committed 2015-11-27 16:35:33 +01:00
1 parent 1fc50b9940
commit ecd7045b84
1 file changed
+4 -3
+4 -3
View File
@@ -66,9 +66,10 @@ def index():
try:
if callable(data):
data = data()
if "query_string" in data:
data["query_string"] = "l10n={}&{}".format(g.locale.language, data["query_string"])
d.update(data)
if data:
if "query_string" in data:
data["query_string"] = "l10n={}&{}".format(g.locale.language, data["query_string"])
d.update(data)
except:
_logger.exception("Error collecting data for preemptive cache from plugin {}".format(key))