Fixed one issue account creation 34/70834/5
authorSean Smith <ssmith@iol.unh.edu>
Wed, 19 Aug 2020 19:51:19 +0000 (15:51 -0400)
committerSean Smith <ssmith@iol.unh.edu>
Fri, 28 Aug 2020 17:36:51 +0000 (13:36 -0400)
Signed-off-by: Sean Smith <ssmith@iol.unh.edu>
Change-Id: I7582c8aa8b58f6adf487329fd4936a58f4bb4727

src/account/models.py

index 2c133bb..2d0293f 100644 (file)
@@ -11,8 +11,6 @@
 from django.contrib.auth.models import User
 from django.db import models
 from django.apps import apps
-from django.core.exceptions import ValidationError
-import re
 import json
 import random
 
@@ -59,20 +57,6 @@ class UserProfile(models.Model):
     class Meta:
         db_table = 'user_profile'
 
-    def clean(self, *args, **kwargs):
-        company = self.company
-        regex = r'[a-z\_\-\.\$]*'
-        pattern = re.compile(regex)
-
-        if not pattern.fullmatch(company):
-            raise ValidationError('Company may only include lowercase letters, _, -, . and $')
-
-        super().clean(*args, **kwargs)
-
-    def save(self, *args, **kwargs):
-        self.full_clean()
-        super().save(*args, **kwargs)
-
     def __str__(self):
         return self.user.username