as_players breaks w/o players
Opened this issue · 0 comments
derek-adair commented
Query.as_players() should return an empty array instead of throwing an exception.
Traceback (most recent call last):
File "", line 1, in
File "/code/nfldb/query.py", line 915, in as_players
q = self._make_join_query(cursor, types.Player)
File "/code/nfldb/query.py", line 764, in _make_join_query
if any(entity._sql_relation_distance(to) > 0 for to in entities):
File "/code/nfldb/query.py", line 764, in
if any(entity._sql_relation_distance(to) > 0 for to in entities):
TypeError: unorderable types: NoneType() > int()