mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Explicitly mark some CharField as non blank
This commit is contained in:
parent
1d9e31c229
commit
4ef1e4fc78
@ -23,9 +23,16 @@ class InvenTreeTree(models.Model):
|
|||||||
abstract = True
|
abstract = True
|
||||||
unique_together = ('name', 'parent')
|
unique_together = ('name', 'parent')
|
||||||
|
|
||||||
name = models.CharField(max_length=100, unique=True)
|
name = models.CharField(
|
||||||
|
blank=False,
|
||||||
|
max_length=100,
|
||||||
|
unique=True
|
||||||
|
)
|
||||||
|
|
||||||
description = models.CharField(max_length=250)
|
description = models.CharField(
|
||||||
|
blank=False,
|
||||||
|
max_length=250
|
||||||
|
)
|
||||||
|
|
||||||
# When a category is deleted, graft the children onto its parent
|
# When a category is deleted, graft the children onto its parent
|
||||||
parent = models.ForeignKey('self',
|
parent = models.ForeignKey('self',
|
||||||
|
@ -87,7 +87,10 @@ class Build(models.Model):
|
|||||||
limit_choices_to={'buildable': True},
|
limit_choices_to={'buildable': True},
|
||||||
)
|
)
|
||||||
|
|
||||||
title = models.CharField(max_length=100, help_text='Brief description of the build')
|
title = models.CharField(
|
||||||
|
blank=False,
|
||||||
|
max_length=100,
|
||||||
|
help_text='Brief description of the build')
|
||||||
|
|
||||||
quantity = models.PositiveIntegerField(
|
quantity = models.PositiveIntegerField(
|
||||||
default=1,
|
default=1,
|
||||||
|
@ -42,7 +42,7 @@ class Company(models.Model):
|
|||||||
It may be a supplier or a customer (or both).
|
It may be a supplier or a customer (or both).
|
||||||
"""
|
"""
|
||||||
|
|
||||||
name = models.CharField(max_length=100, unique=True,
|
name = models.CharField(max_length=100, blank=False, unique=True,
|
||||||
help_text='Company name')
|
help_text='Company name')
|
||||||
|
|
||||||
description = models.CharField(max_length=500)
|
description = models.CharField(max_length=500)
|
||||||
|
@ -390,7 +390,7 @@ class StockItemTracking(models.Model):
|
|||||||
date = models.DateTimeField(auto_now_add=True, editable=False)
|
date = models.DateTimeField(auto_now_add=True, editable=False)
|
||||||
|
|
||||||
# Short-form title for this tracking entry
|
# Short-form title for this tracking entry
|
||||||
title = models.CharField(max_length=250)
|
title = models.CharField(blank=False, max_length=250)
|
||||||
|
|
||||||
# Optional longer description
|
# Optional longer description
|
||||||
notes = models.TextField(blank=True)
|
notes = models.TextField(blank=True)
|
||||||
|
Loading…
Reference in New Issue
Block a user