MCPcopy Index your code
hub / github.com/1Panel-dev/MaxKB / is_valid

Method is_valid

apps/users/serializers/user.py:1178–1183  ·  view source on GitHub ↗
(self, *, raise_exception=False)

Source from the content-addressed store, hash-verified

1176 ])
1177
1178 def is_valid(self, *, raise_exception=False):
1179 super().is_valid()
1180 value = cache.get(get_key(self.data.get("email") + ":" + self.data.get("type")), version=version)
1181 if value is None or value != self.data.get("code"):
1182 raise ExceptionCodeConstants.CODE_ERROR.value.to_app_api_exception()
1183 return True
1184
1185
1186class SwitchLanguageSerializer(serializers.Serializer):

Callers

nothing calls this directly

Calls 3

to_app_api_exceptionMethod · 0.80
is_validMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected