Remove last name Tester work around

This commit is contained in:
Tanner Collin 2020-02-25 23:33:26 +00:00
parent ce4602018b
commit 37c2aeb5b3

View File

@ -376,9 +376,7 @@ class MyRegisterSerializer(RegisterSerializer):
def custom_signup(self, request, user):
data = request.data
is_test_signup = bool(data['last_name'] == 'tester')
if not utils.is_request_from_protospace(request) and not is_test_signup:
if not utils.is_request_from_protospace(request):
user.delete()
raise ValidationError(dict(non_field_errors='Can only register from Protospace.'))