fix: normalize nullable pull request authors (#56)
This commit is contained in:
1 parent
6678358e4c
commit
a92109b65f
2 files changed
+31
-2
No files matched your search
+1
-1
@@ -94,7 +94,7 @@ async def context() -> JSONResponse:
|
||||
if isinstance(i, dict)
|
||||
]
|
||||
pr_models = [
|
||||
PullRequest(id=p["id"], number=p["number"], title=p["title"], state=p["state"], user=p.get("user", {}).get("login", ""), url=p["html_url"])
|
||||
PullRequest(id=p["id"], number=p["number"], title=p["title"], state=p["state"], user=(p.get("user") or {}).get("login", ""), url=p["html_url"])
|
||||
for p in prs_data[:50]
|
||||
if isinstance(p, dict)
|
||||
]
|
||||
|
||||
Reference in new issue
Block a user