Olen/Spond

`Spond.get_event()` and `Spond.get_group()` fail with unexpected `TypeError` if no events/groups are available

elliot-100 opened this issue · 0 comments

get_event() and get_group() call get_events() and get_groups(), which return None if no events/groups are available.

(Until I looked at it properly, I thought they returned empty lists.)

This appears to cause problems:

>       await s.get_event("ID1")

...
        if not self.events:
            await self.get_events()
        for event in self.events:
>           if event["id"] == uid:
E           TypeError: string indices must be integers

..\spond\spond.py:312: TypeError

I'm looking into this.