diff options
author | Sawyer Bergeron <sbergeron@iol.unh.edu> | 2020-08-28 17:51:27 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2020-08-28 17:51:27 +0000 |
commit | 749eab72b7e47a66db65712f0d8f4ea50b2cf584 (patch) | |
tree | fa7fbe3205a916db1567e20884b748ba5beccc8f | |
parent | 1ca205371c3306a23a817d9ea617c1a0596f7912 (diff) | |
parent | 8eafbb5c2d8c346b9f7a2e81d8f27ba8486d2d75 (diff) |
Merge "Fixed one issue account creation"
-rw-r--r-- | src/account/models.py | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/src/account/models.py b/src/account/models.py index 2c133bb..2d0293f 100644 --- a/src/account/models.py +++ b/src/account/models.py @@ -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 |