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

Method is_valid

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

Source from the content-addressed store, hash-verified

1096 fields = '__all__'
1097
1098 def is_valid(self, *, raise_exception=False):
1099 super().is_valid(raise_exception=raise_exception)
1100 code_cache_key = self.data.get('email') + ":" + self.data.get("type")
1101 code_cache_key_lock = code_cache_key + "_lock"
1102 ttl = cache.ttl(code_cache_key_lock, version=version)
1103 if ttl is not None and ttl > 0:
1104 raise AppApiException(500, _("Do not send emails again within {seconds} seconds").format(
1105 seconds=int(ttl.total_seconds())))
1106 return True
1107
1108 def send(self):
1109 """

Callers 15

postMethod · 0.95
postMethod · 0.95
is_validMethod · 0.45
saveMethod · 0.45
is_validMethod · 0.45
is_validMethod · 0.45
is_validMethod · 0.45
editMethod · 0.45
re_passwordMethod · 0.45
is_validMethod · 0.45
is_validMethod · 0.45
is_validMethod · 0.45

Calls 2

AppApiExceptionClass · 0.90
getMethod · 0.45

Tested by

no test coverage detected