Fakultas Ilmu Komputer UI

Verified Commit 1a7a7d89 authored by Giovan Isa Musthofa's avatar Giovan Isa Musthofa
Browse files

[CHORES] Remove unreachable code on RegisterView

parent 213e3ba8
Pipeline #38500 passed with stages
in 3 minutes and 33 seconds
......@@ -63,11 +63,7 @@ class RegisterView(generics.CreateAPIView):
def create(self, request, *args, **kwargs):
response = super().create(request, *args, **kwargs)
try:
user = models.User.objects.get(email=request.data['email'])
except models.User.DoesNotExists as err:
# I guess this will never be evaluated
raise serializers.ValidationError(err.args)
user = models.User.objects.get(email=request.data['email'])
self.send_mail(request, user)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment