diff --git a/accounts/models.py b/accounts/models.py index 3454ef2..7ad3802 100644 --- a/accounts/models.py +++ b/accounts/models.py @@ -2,7 +2,7 @@ from django.db import models from django.contrib.auth.models import User from django.conf import settings from instances.models import Instance -from django.core.validators import integer_validator, MinValueValidator +from django.core.validators import MinValueValidator class UserInstance(models.Model): @@ -27,10 +27,10 @@ class UserSSHKey(models.Model): class UserAttributes(models.Model): user = models.OneToOneField(User, on_delete=models.CASCADE) can_clone_instances = models.BooleanField(default=True) - max_instances = models.IntegerField(default=1, help_text="-1 for unlimited. Any integer value", validators=[integer_validator,MinValueValidator(-1),]) - max_cpus = models.IntegerField(default=1, help_text="-1 for unlimited. Any integer value", validators=[integer_validator,MinValueValidator(-1)]) - max_memory = models.IntegerField(default=2048, help_text="-1 for unlimited. Any integer value", validators=[integer_validator,MinValueValidator(-1)]) - max_disk_size = models.IntegerField(default=20, help_text="-1 for unlimited. Any integer value", validators=[integer_validator,MinValueValidator(-1)]) + max_instances = models.IntegerField(default=1, help_text="-1 for unlimited. Any integer value", validators=[MinValueValidator(-1),]) + max_cpus = models.IntegerField(default=1, help_text="-1 for unlimited. Any integer value", validators=[MinValueValidator(-1)]) + max_memory = models.IntegerField(default=2048, help_text="-1 for unlimited. Any integer value", validators=[MinValueValidator(-1)]) + max_disk_size = models.IntegerField(default=20, help_text="-1 for unlimited. Any integer value", validators=[MinValueValidator(-1)]) @staticmethod def create_missing_userattributes(user):