Skip to content

Commit 04bd807

Browse files
committed
fix: handle empty meetings in changlog [skip ci]
1 parent 1eaf02f commit 04bd807

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ferry/database/generate_changelog.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,11 +195,11 @@ def print_course_changes(
195195
old_meetings = cast(pd.DataFrame, old).apply(
196196
lambda row: f"{print_days_of_week(row['days_of_week'])} {row['start_time']}{row['end_time']} {location_info.loc[row['location_id']]['name'] if not pd.isna(row['location_id']) else ''}",
197197
axis=1,
198-
)
198+
) if not old.empty else []
199199
new_meetings = cast(pd.DataFrame, new).apply(
200200
lambda row: f"{print_days_of_week(row['days_of_week'])} {row['start_time']}{row['end_time']} {location_info.loc[row['location_id']]['name'] if not pd.isna(row['location_id']) else ''}",
201201
axis=1,
202-
)
202+
) if not new.empty else []
203203
res += f" - Meetings: {", ".join(old_meetings) or "N/A"}{", ".join(new_meetings) or "N/A"}\n"
204204
elif column == "listings":
205205
old_listings = cast(pd.DataFrame, old).apply(create_listing_link, axis=1)

0 commit comments

Comments
 (0)