aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/account/models.py16
-rw-r--r--src/resource_inventory/models.py2
2 files changed, 1 insertions, 17 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
diff --git a/src/resource_inventory/models.py b/src/resource_inventory/models.py
index fb3c33e..01da8bb 100644
--- a/src/resource_inventory/models.py
+++ b/src/resource_inventory/models.py
@@ -420,7 +420,7 @@ class Network(models.Model):
class PhysicalNetwork(models.Model):
vlan_id = models.IntegerField()
generic_network = models.ForeignKey(Network, on_delete=models.CASCADE)
- bundle = models.ForeignKey(ResourceBundle, null=True, on_delete=models.CASCADE)
+ bundle = models.ForeignKey(ResourceBundle, null=True, blank=True, on_delete=models.CASCADE)
def get_configuration(self, state):
"""