diff --git a/core/models/accounts.py b/core/models/accounts.py index de404cd3c35a80fba7c33877c9206c14d115ba87..97cf2afc24d23896e12d934e0aa3391a382ac7ec 100755 --- a/core/models/accounts.py +++ b/core/models/accounts.py @@ -140,7 +140,7 @@ class Company(models.Model): updated = models.DateTimeField(auto_now=True) user = models.OneToOneField(User) description = models.TextField() - status = models.IntegerField(default=NEW) + status = models.IntegerField(default=NEW, validators=[MaxValueValidator(2), MinValueValidator(0)]) logo = models.FileField(upload_to=get_company_logo_file_path, null=True, blank=True, validators=[validate_image_file_extension]) address = models.CharField(max_length=1000, blank=True, null=True) category = models.CharField(max_length=140, default="Belum ada kategori perusahaan")