Skip to content

Commit

Permalink
use columns if given
Browse files Browse the repository at this point in the history
  • Loading branch information
pivnicek committed Apr 12, 2021
1 parent d7a0897 commit fc95ff8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion kbcstorage/tables.py
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,8 @@ def export_to_file(self, table_id, path_name, limit=None,

with open(local_file, mode='rb') as in_file, \
open(destination_file, mode='wb') as out_file:
columns = table_detail['columns']
if columns is None:
columns = table_detail['columns']
columns = ['"{}"'.format(col) for col in columns]
header = ",".join(columns) + '\n'
out_file.write(header.encode('utf-8'))
Expand Down

0 comments on commit fc95ff8

Please sign in to comment.