Skip to content

Commit

Permalink
also replace deprecated pydantic functions in django integration
Browse files Browse the repository at this point in the history
  • Loading branch information
lilioid committed Feb 14, 2025
1 parent b7db232 commit 363f69f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/simple_openid_connect/integrations/django/apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def safe_settings(self) -> SettingsModel:
"""
type-validated version of django settings
"""
return SettingsModel.from_orm(settings)
return SettingsModel.model_validate(settings)

@cached_property
def user_mapper(self) -> "UserMapper":
Expand Down
2 changes: 1 addition & 1 deletion src/simple_openid_connect/integrations/django/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def update_session(
access_token_expiry=_calc_expiry(token_response.expires_in),
refresh_token=token_response.refresh_token or "",
refresh_token_expiry=_calc_expiry(token_response.refresh_expires_in),
_id_token=id_token.json(), # type: ignore[unused-ignore,misc]
_id_token=id_token.model_dump_json(), # type: ignore[unused-ignore,misc]
raw_id_token=token_response.id_token,
)

Expand Down

0 comments on commit 363f69f

Please sign in to comment.