fix: normalize nullable repository descriptions (#54)
This commit is contained in:
1 parent
60b6f1a74d
commit
6a22bc212d
2 files changed
+30
-2
No files matched your search
+1
-1
@@ -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)
|
||||
]
|
||||
|
||||
Reference in new issue
Block a user