Skip to content

Commit

Permalink
root_validator to model_validator
Browse files Browse the repository at this point in the history
  • Loading branch information
yuvanist committed Aug 2, 2023
1 parent e59bb96 commit 0dee34e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gotrue/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from time import time
from typing import Any, Callable, Dict, List, Union

from pydantic import BaseModel, root_validator
from pydantic import BaseModel, model_validator
from typing_extensions import Literal, NotRequired, TypedDict

Provider = Literal[
Expand Down Expand Up @@ -106,7 +106,7 @@ class Session(BaseModel):
token_type: str
user: User

@root_validator
@model_validator
def validator(cls, values: dict) -> dict:
expires_in = values.get("expires_in")
if expires_in and not values.get("expires_at"):
Expand Down

0 comments on commit 0dee34e

Please sign in to comment.