فهرست منبع

HUE-3294 [metadata] Avoid error when search returns the HDFS root directory

Romain Rigaux 9 سال پیش
والد
کامیت
c9034b1
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  1. 1 1
      desktop/libs/metadata/src/metadata/navigator_api.py

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

@@ -244,7 +244,7 @@ def _augment_highlighting(query_s, records):
   for record in records:
     name = record.get('originalName', '')
     record['hue_description'] = ''
-    record['hue_name'] = (record.get('parentPath', '').replace('/', '.') + '.').lstrip('.')
+    record['hue_name'] = (record.get('parentPath', '').replace('/', '.') + '.').lstrip('.') if record.get('parentPath') else ''
 
     for term in ts:
       name = _highlight(term, name)