Mercurial > libervia-backend
changeset 2344:78ffb9ce57a4
jp (common): fixed empty table display when headers are specified
author | Goffi <goffi@goffi.org> |
---|---|
date | Wed, 23 Aug 2017 00:08:30 +0200 |
parents | ca1ab42c7ae9 |
children | c57bc0fe17d9 |
files | frontends/src/jp/common.py |
diffstat | 1 files changed, 4 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/frontends/src/jp/common.py Tue Aug 22 22:13:22 2017 +0200 +++ b/frontends/src/jp/common.py Wed Aug 23 00:08:30 2017 +0200 @@ -555,6 +555,10 @@ raise exceptions.DataError(u'rows size is not coherent') self.rows.append(new_row) + if not data and headers is not None: + # the table is empty, we print headers at their lenght + self.sizes = [len(h) for h in headers] + @staticmethod def readDictValues(data, keys, defaults=None): if defaults is None: