diff options
Diffstat (limited to 'python/report_ops/sma.py')
| -rw-r--r-- | python/report_ops/sma.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/python/report_ops/sma.py b/python/report_ops/sma.py index c147ee4c..caadba85 100644 --- a/python/report_ops/sma.py +++ b/python/report_ops/sma.py @@ -9,7 +9,7 @@ from exchangelib import FileAttachment import pandas as pd from io import StringIO from typing import ClassVar -from .headers import POSITION_HEADERS +from .headers import get_position_headers import csv @@ -220,9 +220,10 @@ class PositionReport(Deal, deal_type=None, table_name=None): def build_buffer(cls, cob, fund): buf = StringIO() csvwriter = csv.writer(buf) - csvwriter.writerow(POSITION_HEADERS) + headers = get_position_headers(fund) + csvwriter.writerow(headers) csvwriter.writerows( - [[obj.get(h) for h in POSITION_HEADERS] for obj in cls.staging_queue] + [[obj.get(h) for h in headers] for obj in cls.staging_queue] ) buf = buf.getvalue().encode() dest = get_path(cob, fund) |
