Commit c348e213 authored by David Huss's avatar David Huss 💬
Browse files

Handle zero meetings correctly

parent 140a4492
......@@ -133,6 +133,10 @@ def get_meetings(secret: Secret, bbb_url: Url) -> Iterable[XmlDictConfig]:
meetings = []
d = request_meetings(secret, bbb_url)
if d["meetings"] is None:
print("There are no active meetings currently.")
if type(d["meetings"]["meeting"]) is XmlListConfig:
meetings = sorted([m for m in d["meetings"]["meeting"] if m["running"] == "true"], key=lambda x:int(x['participantCount']), reverse=True)
elif type(d["meetings"]["meeting"]) is XmlDictConfig:
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment