From 8eafbb5c2d8c346b9f7a2e81d8f27ba8486d2d75 Mon Sep 17 00:00:00 2001 From: Sean Smith Date: Wed, 19 Aug 2020 15:51:19 -0400 Subject: Fixed one issue account creation Signed-off-by: Sean Smith Change-Id: I7582c8aa8b58f6adf487329fd4936a58f4bb4727 --- src/account/models.py | 16 ---------------- 1 file changed, 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 -- cgit 1.2.3-korg