瀏覽代碼

HUE-7935 [metadata] Force put call to Navigator to send json mimetype

Romain Rigaux 7 年之前
父節點
當前提交
02cd20edb8
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      desktop/libs/metadata/src/metadata/navigator_client.py

+ 1 - 1
desktop/libs/metadata/src/metadata/navigator_client.py

@@ -399,7 +399,7 @@ class NavigatorApi(object):
     """
     """
     try:
     try:
       data = json.dumps(metadata)
       data = json.dumps(metadata)
-      return self._root.put('entities/%s' % entity_id, params=self.__params, data=data, allow_redirects=True, clear_cookies=True)
+      return self._root.put('entities/%s' % entity_id, params=self.__params, data=data, contenttype=_JSON_CONTENT_TYPE, allow_redirects=True, clear_cookies=True)
     except RestException, e:
     except RestException, e:
       msg = 'Failed to update entity %s: %s' % (entity_id, str(e))
       msg = 'Failed to update entity %s: %s' % (entity_id, str(e))
       LOG.error(msg)
       LOG.error(msg)