mirror of
				https://github.com/paperless-ngx/paperless-ngx.git
				synced 2025-10-30 03:56:23 -05:00 
			
		
		
		
	feat: make the content field optional
This commit is contained in:
		| @@ -158,13 +158,22 @@ class Document(models.Model): | |||||||
|  |  | ||||||
|     correspondent = models.ForeignKey( |     correspondent = models.ForeignKey( | ||||||
|         Correspondent, blank=True, null=True, related_name="documents") |         Correspondent, blank=True, null=True, related_name="documents") | ||||||
|  |  | ||||||
|     title = models.CharField(max_length=128, blank=True, db_index=True) |     title = models.CharField(max_length=128, blank=True, db_index=True) | ||||||
|     content = models.TextField(db_index=True) |  | ||||||
|  |     content = models.TextField( | ||||||
|  |         db_index=True, | ||||||
|  |         blank=True, | ||||||
|  |         help_text="The raw, text-only data of the document.  This field is " | ||||||
|  |                   "primarily used for searching." | ||||||
|  |     ) | ||||||
|  |  | ||||||
|     file_type = models.CharField( |     file_type = models.CharField( | ||||||
|         max_length=4, |         max_length=4, | ||||||
|         editable=False, |         editable=False, | ||||||
|         choices=tuple([(t, t.upper()) for t in TYPES]) |         choices=tuple([(t, t.upper()) for t in TYPES]) | ||||||
|     ) |     ) | ||||||
|  |  | ||||||
|     tags = models.ManyToManyField( |     tags = models.ManyToManyField( | ||||||
|         Tag, related_name="documents", blank=True) |         Tag, related_name="documents", blank=True) | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Daniel Quinn
					Daniel Quinn