Răsfoiți Sursa

[metastore] Replace 'None' with 'NULL' in table sample

https://github.com/cloudera/hue/pull/144
dbeech 11 ani în urmă
părinte
comite
9e0eb37
1 a modificat fișierele cu 7 adăugiri și 1 ștergeri
  1. 7 1
      apps/metastore/src/metastore/templates/sample.mako

+ 7 - 1
apps/metastore/src/metastore/templates/sample.mako

@@ -37,7 +37,13 @@ from django.utils.translation import ugettext as _
       % for i, row in enumerate(sample):
       <tr>
         % for item in row:
-        <td>${ smart_unicode(item, errors='ignore') }</td>
+        <td>
+          % if item is None:
+            NULL
+          % else:
+            ${ escape(smart_unicode(item, errors='ignore')).replace(' ', '&nbsp;') | n,unicode }
+          % endif
+        </td>
         % endfor
       </tr>
       % endfor