Commit 4e883166 authored by David Huss's avatar David Huss 💬
Browse files

Fix behaviour for 0 and 1 meetings (tested)

parent d19d1d3f
......@@ -140,11 +140,7 @@ 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:
if len(d["meetings"]["meeting"]) > 0:
meetings = [d["meetings"]["meeting"][0]]
else:
print("There are no active meetings currently.")
exit()
meetings = [d["meetings"]["meeting"]]
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