Skip to content

Commit 6cddc4b

Browse files
authored
Fix 3.13 problem with inspect.signature (#151)
* Fix 3.13 problem with `inspect.signature` Closes #149 * Update schema.py * Update schema.py
1 parent 3f3f934 commit 6cddc4b

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

ninja_jwt/schema.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -142,19 +142,19 @@ def validate_inputs(cls, values: SCHEMA_INPUT) -> dict:
142142

143143
@model_validator(mode="after")
144144
def post_validate(
145-
cls, values: "TokenObtainInputSchemaBase", info: ValidationInfo
145+
self, info: ValidationInfo
146146
) -> BaseModel:
147147
schema_input = SchemaInputService(
148-
values.model_dump(), cls.model_config, info.context.get("request")
148+
self.model_dump(), self.__class__.model_config, info.context.get("request")
149149
)
150150

151151
credentials = schema_input.get_values()
152152
request = schema_input.get_request()
153153

154-
values.authenticate(request, credentials)
155-
cls.post_validate_schema(values)
154+
self.authenticate(request, credentials)
155+
self.post_validate_schema(self)
156156

157-
return values
157+
return self
158158

159159
@classmethod
160160
def post_validate_schema(cls, values: "TokenObtainInputSchemaBase") -> None:

0 commit comments

Comments
 (0)