Skip to content

Commit

Permalink
allow nullable fields
Browse files Browse the repository at this point in the history
  • Loading branch information
nf1s committed Apr 26, 2021
1 parent 52e14a5 commit 243f05d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions covid/john_hopkins/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ class CovidModel(BaseModel):

id: str = Field(..., alias="OBJECTID")
country: str = Field(..., alias="Country_Region")
confirmed: int = Field(0, alias="Confirmed")
active: int = Field(0, alias="Active")
deaths: int = Field(0, alias="Deaths")
confirmed: int = Field(None, alias="Confirmed")
active: int = Field(None, alias="Active")
deaths: int = Field(None, alias="Deaths")
recovered: int = Field(None, alias="Recovered")
latitude: float = Field(None, alias="Lat")
longitude: float = Field(None, alias="Long_")
last_update: int = Field(0, alias="Last_Update")
last_update: int = Field(None, alias="Last_Update")


class CountryModel(BaseModel):
Expand Down

0 comments on commit 243f05d

Please sign in to comment.