Skip to content

Commit

Permalink
alias
Browse files Browse the repository at this point in the history
  • Loading branch information
loechel committed Jan 3, 2024
1 parent 3cdde72 commit 2b3a7cc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/edutap/wallet_google/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,9 @@ def _validate_data_and_convert_to_json(
"""
verified_data = _validate_data(model, data)
verified_json = verified_data.model_dump_json(
exclude_none=True,
# exclude_none=False, # should be False, so it should be able to reset a value to None
# exclude_none=True,
by_alias=True,
exclude_none=False, # should be False, so it should be able to reset a value to None
)
return (
getattr(verified_data, resource_id_key),
Expand Down
2 changes: 1 addition & 1 deletion src/edutap/wallet_google/models/retail.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ class LoyaltyPointsBalance(BaseModel):
"""

string: str | None = None
int_: int | None = Field(alias="int", default=None)
int_: int | None = Field(alias="int", serialization_alias="int", default=None)
double: float | None = None
money: Money | None = None

Expand Down

0 comments on commit 2b3a7cc

Please sign in to comment.