From b852b3edfdb585312281e392d33e40eee5df4855 Mon Sep 17 00:00:00 2001 From: Chaoyi Zha Date: Sat, 30 Jan 2016 17:32:07 -0500 Subject: [PATCH] Fix silly typos causing certain meetings from being omitted --- mote/__init__.py | 3 ++- mote/util.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/mote/__init__.py b/mote/__init__.py index cded92de..914be794 100644 --- a/mote/__init__.py +++ b/mote/__init__.py @@ -355,11 +355,12 @@ def search_sugg(): for cmk in channel_meetings: if res_num >= display_num: break + if search_term in cmk: friendly_name = get_friendly_name(cmk) or "A friendly meeting group." try: - dates, latest = get_arrow_dates(team_meetings[cmk]) + dates, latest = get_arrow_dates(channel_meetings[cmk]) except KeyError: continue diff --git a/mote/util.py b/mote/util.py index 565f0ffc..825acc86 100644 --- a/mote/util.py +++ b/mote/util.py @@ -96,6 +96,6 @@ def get_arrow_dates(team_meetings): raise KeyError("Unavailable dates.") dates.sort() - latest = dates.pop() + latest = dates[-1] return dates, latest