fix display empty table in brief

develop
Спиридонов Денис 12 years ago
parent 78f0dfed32
commit 893c184d26

@ -150,6 +150,14 @@ def print_brief_group(Fields, group_name):
body.append(row.string)
else: body = [[]]
# if empty table
if not filter (None, map(lambda x: x, body)):
body = [['']*len(head)]
res = printTable(body, head)
sys.stdout.flush()
sys.stdout.write(res)
continue
ChoiceValue = field.tablevalue.values.ChoiceValue
for row in xrange(len(ChoiceValue)):
if ChoiceValue[row].typefield in ['check', 'check_tristate']:

@ -130,7 +130,6 @@ def call_method(client, args):
param_object['CheckOnly'] = False
method_result = client.service[0][method](client.sid, param_object)
return method_result
def _getattr(obj, attr):
@ -188,7 +187,6 @@ def collect_table(field, val_list, client):
obj_body.append(obj_row.string)
obj_body = collect_obj_body(obj_body, field)
column = len(field.tablevalue.head.string)
ChoiceValue = field.tablevalue.values.ChoiceValue
@ -260,6 +258,8 @@ def collect_table(field, val_list, client):
continue
obj_body.append(temp_row)
key_list.append(temp_row[0])
if not obj_body:
obj_body = [[None]]
return listToArrayArray(client, obj_body)
def collect_obj_body(body, field):

Loading…
Cancel
Save