fix: ensure count is never null in GET /refractor/cards (#183)
Guards against Peewee 3.17.9 returning None from .count() on a complex multi-join query when 0 rows match the filter set. Closes #183 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
cc65dc5395
commit
4e7418707f
@ -211,7 +211,7 @@ async def list_card_states(
|
||||
if evaluated_only:
|
||||
query = query.where(RefractorCardState.last_evaluated_at.is_null(False))
|
||||
|
||||
total = query.count()
|
||||
total = query.count() or 0
|
||||
items = []
|
||||
for state in query.offset(offset).limit(limit):
|
||||
player_name = None
|
||||
|
||||
Loading…
Reference in New Issue
Block a user