-
Notifications
You must be signed in to change notification settings - Fork 442
Closed
Labels
Description
Heya, I've noticed that on line 712 of address_book.py:
contacts[0] if contacts else None
a generator is being tested for truthiness (will always return True) and having item access attempted on it (will always raise TypeError).
The fix should be as easy as wrapping the previous line in list(), like so:
contacts = list(self.get_contacts(limit=1, query=query))
where currently it looks like:
contacts = self.get_contacts(limit=1, query=query)
Cheers!