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

Handle edge case with zero (active) meetings

parent a2ff79fd
......@@ -140,7 +140,11 @@ def get_meetings(secret: Secret, bbb_url: Url) -> Iterable[XmlDictConfig]:
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:
meetings = [d["meetings"]["meeting"][0]]
if len(d["meetings"]["meeting"]) > 0:
meetings = [d["meetings"]["meeting"][0]]
else:
print("There are no active meetings currently.")
exit()
return meetings
......
Markdown is supported
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