Remove last name Tester work around
This commit is contained in:
@@ -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.'))
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user