diff --git a/app.fcgi b/app.fcgi index ff6758f..0bf007f 100755 --- a/app.fcgi +++ b/app.fcgi @@ -49,7 +49,6 @@ def setup_app(): cache.last_background_updates = {} getLogger("earwigbot.wiki.cvworker").setLevel(INFO) - # getLogger().handlers .... globalize() @app.before_request @@ -107,6 +106,7 @@ def api_json(): format = request.args.get("format", "json") if format in ["json", "jsonfm"]: + update_sites() try: result = handle_api_request() except Exception as exc: diff --git a/templates/api.mako b/templates/api.mako index 976ff36..e25b0fc 100644 --- a/templates/api.mako +++ b/templates/api.mako @@ -14,7 +14,7 @@ % endfor ${do_indent(indent)} } - % elif isinstance(obj, (type([]), type(()))): + % elif isinstance(obj, (list, tuple, set)): [ % for elem in obj: ${do_indent(indent + 1)}