Remove last name Tester work around
This commit is contained in:
parent
ce4602018b
commit
37c2aeb5b3
|
@ -376,9 +376,7 @@ class MyRegisterSerializer(RegisterSerializer):
|
||||||
def custom_signup(self, request, user):
|
def custom_signup(self, request, user):
|
||||||
data = request.data
|
data = request.data
|
||||||
|
|
||||||
is_test_signup = bool(data['last_name'] == 'tester')
|
if not utils.is_request_from_protospace(request):
|
||||||
|
|
||||||
if not utils.is_request_from_protospace(request) and not is_test_signup:
|
|
||||||
user.delete()
|
user.delete()
|
||||||
raise ValidationError(dict(non_field_errors='Can only register from Protospace.'))
|
raise ValidationError(dict(non_field_errors='Can only register from Protospace.'))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user