Skip to content

Commit 7b1bd99

Browse files
authored
fix openalex deserialization (#49)
* fix: openalex nullable fields * chore: prepare release
1 parent b10b8e9 commit 7b1bd99

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/bibx/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"read_wos",
2929
]
3030

31-
__version__ = "0.9.0"
31+
__version__ = "0.9.1"
3232

3333

3434
def query_openalex(

src/bibx/clients/openalex.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class AuthorPosition(Enum):
2626
class Author(BaseModel):
2727
"""An author from the openalex API."""
2828

29-
id: str
29+
id: str | None = None
3030
display_name: str
3131
orcid: str | None = None
3232

@@ -80,7 +80,7 @@ class Work(BaseModel):
8080
ids: dict[str, str]
8181
doi: str | None = None
8282
title: str | None = None
83-
publication_year: int
83+
publication_year: int | None = None
8484
authorships: list[WorkAuthorship]
8585
cited_by_count: int
8686
keywords: list[WorkKeyword]

0 commit comments

Comments
 (0)