fix: normalize nullable repository descriptions (#54)
CI / lint (pull_request) Successful in 8s
CI / build-frontend (pull_request) Successful in 4s

This commit is contained in:
timmy committed 2026-08-06 00:17:59 +00:00
1 parent 60b6f1a74d
commit 6a22bc212d
2 files changed
+30 -2

No files matched your search

+1 -1
View File
@@ -84,7 +84,7 @@ async def context() -> JSONResponse:
} if isinstance(e, TimeoutError) else None)
user_model = User(id=user_data["id"], login=user_data["login"], full_name=user_data.get("full_name", ""), email=user_data.get("email", ""))
repo_models = [
Repo(id=r["id"], name=r["name"], full_name=r["full_name"], description=r.get("description", ""), url=r["html_url"], updated_at=r.get("updated_at", ""))
Repo(id=r["id"], name=r["name"], full_name=r["full_name"], description=r.get("description") or "", url=r["html_url"], updated_at=r.get("updated_at", ""))
for r in repo_data[:50]
if isinstance(r, dict)
]