From 303359c921647887de6c2b12aaafb5a915551f13 Mon Sep 17 00:00:00 2001 From: Emanuele Date: Wed, 3 Dec 2025 10:27:54 +0100 Subject: [PATCH] refix merge --- cntmanage/flightslot/actions/exportweek.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/cntmanage/flightslot/actions/exportweek.py b/cntmanage/flightslot/actions/exportweek.py index 5930e13..7da0961 100644 --- a/cntmanage/flightslot/actions/exportweek.py +++ b/cntmanage/flightslot/actions/exportweek.py @@ -114,7 +114,7 @@ def export_selected(request: HttpRequest, queryset: QuerySet[WeekPreference]) -> mission_name if t.saturday else "", mission_name if t.sunday else "" ] - mission_notes = t.notes if t.notes else "--" + mission_notes = t.notes.strip() if t.notes else "--" mission_data.append([str(q.week), *student_data, *mission_days, mission_notes, student_phone, student_email, ]) # Fill HourBuilding rows @@ -132,7 +132,7 @@ def export_selected(request: HttpRequest, queryset: QuerySet[WeekPreference]) -> hb_name if h.saturday else "", hb_name if h.sunday else "" ] - hb_notes: List[str] = [f"{h.notes}", "---"] if h.notes else [] + hb_notes: List[str] = [f"{h.notes.strip()}", "---"] if h.notes else [] hb_legs_all = HourBuildingLegBase.objects.filter(hb_id = h.id) for hh in hb_legs_all: time_str: str = ':'.join(str(hh.time).split(':')[:2]) # keep only hours and minutes @@ -179,8 +179,6 @@ def export_selected(request: HttpRequest, queryset: QuerySet[WeekPreference]) -> start_column=max(merge_col_start,1), end_column=max(c-1,1)) # end merge to previous column prev_cell_val = cell_content - if c >= note_index - 1: # Do not merge beyond notes - break # Incement row counter row_offset += 1