Skip to content
This repository has been archived by the owner on Jun 5, 2020. It is now read-only.

Commit

Permalink
fix user list
Browse files Browse the repository at this point in the history
  • Loading branch information
faruken committed Aug 25, 2016
1 parent 127c431 commit 08463a0
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions aiotinder/controllers/tinder.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

"""Tinder module.
"""

from typing import (AnyStr, List)

from aiotinder.models.model import User
Expand Down Expand Up @@ -35,4 +34,8 @@ async def prospective_matches(self, locale: AnyStr = "en-US") -> List[User]:
:return: List of users.
"""
response = await self.tinder.prospective(locale)
return [User(**result) for result in response["results"]]
res = []
for result in response["results"]:
if result.get("type") == "user":
res.append(User(**result.get("user")))
return res

0 comments on commit 08463a0

Please sign in to comment.