upload_to passes two arguments, we don't use them but have to allow them

This commit is contained in:
Roberto Rosario
2014-10-30 15:58:13 -04:00
parent 09f4280f58
commit 11382caa9e
2 changed files with 2 additions and 2 deletions

View File

@@ -313,7 +313,7 @@ class DocumentVersion(models.Model):
comment = models.TextField(blank=True, verbose_name=_(u'Comment'))
# File related fields
file = models.FileField(upload_to=lambda: UUID_FUNCTION(), storage=storage_backend, verbose_name=_(u'File'))
file = models.FileField(upload_to=lambda instance, filename: UUID_FUNCTION(), storage=storage_backend, verbose_name=_(u'File'))
mimetype = models.CharField(max_length=255, null=True, blank=True, editable=False)
encoding = models.CharField(max_length=64, null=True, blank=True, editable=False)