Преглед изворни кода

HUE-8772 [core] Webworkers are failing to start

Romain Rigaux пре 6 година
родитељ
комит
d0c74976b9
1 измењених фајлова са 3 додато и 0 уклоњено
  1. 3 0
      desktop/core/src/desktop/lib/django_util.py

+ 3 - 0
desktop/core/src/desktop/lib/django_util.py

@@ -216,6 +216,9 @@ def render(template, request, data, json=None, template_lib=None, force_template
   # request.ajax is defined in the AjaxMiddleware. But we might hit
   # errors before getting to that point.
   is_ajax = getattr(request, "ajax", False)
+  if data is None:
+    data = {}
+
   if not force_template and not is_jframe_request(request) and (is_ajax or template is None):
     if json is not None:
       return render_json(json, request.GET.get("callback"), status=status)