fix: pass last_technique_at through row unpacking
This commit is contained in:
parent
acd0567e3c
commit
8c81c472ea
1 changed files with 7 additions and 1 deletions
|
|
@ -82,9 +82,15 @@ async def list_creators(
|
||||||
creator = row[0]
|
creator = row[0]
|
||||||
tc = row[1] or 0
|
tc = row[1] or 0
|
||||||
vc = row[2] or 0
|
vc = row[2] or 0
|
||||||
|
lta = row[3] # None when creator has 0 techniques
|
||||||
base = CreatorRead.model_validate(creator)
|
base = CreatorRead.model_validate(creator)
|
||||||
items.append(
|
items.append(
|
||||||
CreatorBrowseItem(**base.model_dump(), technique_count=tc, video_count=vc)
|
CreatorBrowseItem(
|
||||||
|
**base.model_dump(),
|
||||||
|
technique_count=tc,
|
||||||
|
video_count=vc,
|
||||||
|
last_technique_at=lta,
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
# Get total count (without offset/limit)
|
# Get total count (without offset/limit)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue