diff options
| author | Michał Klichowicz <emkael@tlen.pl> | 2026-09-02 11:10:04 +0200 |
|---|---|---|
| committer | Michał Klichowicz <emkael@tlen.pl> | 2026-09-02 11:11:56 +0200 |
| commit | 96cde8c75026f3036ddb943fdca0f720f12c0f19 (patch) | |
| tree | a79e16f858aaa96a27cd51c82b43bcc89d0c7216 /dealconvert/formats | |
| parent | f12ff6b0e4e7c7fbf2ee93bae61a1893c733621e (diff) | |
Choose first available event name in HTML format
Diffstat (limited to 'dealconvert/formats')
| -rw-r--r-- | dealconvert/formats/html.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/dealconvert/formats/html.py b/dealconvert/formats/html.py index 6e5537e..a30a8fc 100644 --- a/dealconvert/formats/html.py +++ b/dealconvert/formats/html.py @@ -183,7 +183,7 @@ class HTMLFormat(BinaryFormat): def get_html_content(self, dealset): deal_rows = [] - event_name = dealset[0].event + event_name = ([deal.event for deal in dealset if deal.event] + [''])[0] or 'Event' event_name = event_name.decode(chardet.detect(event_name)['encoding'] or 'ascii') while len(dealset) > 0: deal_rows.append(dealset[0:self.deals_per_column]) |
