We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cdb493e commit 238f735Copy full SHA for 238f735
1 file changed
apps/users/serializers/user.py
@@ -1050,11 +1050,6 @@ class Meta:
1050
1051
def is_valid(self, *, raise_exception=False):
1052
super().is_valid(raise_exception=raise_exception)
1053
- user_exists = QuerySet(User).filter(email=self.data.get('email')).exists()
1054
- if not user_exists and self.data.get('type') == 'reset_password':
1055
- raise ExceptionCodeConstants.SEND_EMAIL_ERROR.value.to_app_api_exception()
1056
- elif user_exists and self.data.get('type') == 'register':
1057
1058
code_cache_key = self.data.get('email') + ":" + self.data.get("type")
1059
code_cache_key_lock = code_cache_key + "_lock"
1060
ttl = cache.ttl(code_cache_key_lock, version=version)
0 commit comments