Make document type deletion period optional.

This commit is contained in:
Roberto Rosario
2016-03-09 14:39:16 -04:00
parent 9b315a7cf4
commit 5b6b35f1c3
3 changed files with 30 additions and 4 deletions
+5 -4
View File
@@ -76,14 +76,15 @@ class DocumentType(models.Model):
verbose_name=_('Trash time unit')
)
delete_time_period = models.PositiveIntegerField(
default=DEFAULT_DELETE_PERIOD, help_text=_(
blank=True, default=DEFAULT_DELETE_PERIOD, help_text=_(
'Amount of time after which documents of this type in the trash '
'will be deleted.'
), verbose_name=_('Delete time period')
), null=True, verbose_name=_('Delete time period')
)
delete_time_unit = models.CharField(
choices=TIME_DELTA_UNIT_CHOICES, default=DEFAULT_DELETE_TIME_UNIT,
max_length=8, verbose_name=_('Delete time unit')
blank=True, choices=TIME_DELTA_UNIT_CHOICES,
default=DEFAULT_DELETE_TIME_UNIT, max_length=8, null=True,
verbose_name=_('Delete time unit')
)
objects = DocumentTypeManager()