refix merge
This commit is contained in:
@@ -114,7 +114,7 @@ def export_selected(request: HttpRequest, queryset: QuerySet[WeekPreference]) ->
|
|||||||
mission_name if t.saturday else "",
|
mission_name if t.saturday else "",
|
||||||
mission_name if t.sunday 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, ])
|
mission_data.append([str(q.week), *student_data, *mission_days, mission_notes, student_phone, student_email, ])
|
||||||
|
|
||||||
# Fill HourBuilding rows
|
# 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.saturday else "",
|
||||||
hb_name if h.sunday 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)
|
hb_legs_all = HourBuildingLegBase.objects.filter(hb_id = h.id)
|
||||||
for hh in hb_legs_all:
|
for hh in hb_legs_all:
|
||||||
time_str: str = ':'.join(str(hh.time).split(':')[:2]) # keep only hours and minutes
|
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),
|
start_column=max(merge_col_start,1),
|
||||||
end_column=max(c-1,1)) # end merge to previous column
|
end_column=max(c-1,1)) # end merge to previous column
|
||||||
prev_cell_val = cell_content
|
prev_cell_val = cell_content
|
||||||
if c >= note_index - 1: # Do not merge beyond notes
|
|
||||||
break
|
|
||||||
|
|
||||||
# Incement row counter
|
# Incement row counter
|
||||||
row_offset += 1
|
row_offset += 1
|
||||||
|
|||||||
Reference in New Issue
Block a user