Merge pull request #3329 from paperless-ngx/feature-full-dynamic-counts

Enhancement: dynamic counts include all pages, hide for "Any"
This commit is contained in:
shamoon 2023-05-10 11:15:47 -07:00 committed by GitHub
commit b802f3a71f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 93 additions and 5 deletions

View file

@ -424,7 +424,7 @@ class DocumentSerializer(OwnedObjectSerializer, DynamicFieldsModelSerializer):
def to_representation(self, instance):
doc = super().to_representation(instance)
if self.truncate_content:
if self.truncate_content and "content" in self.fields:
doc["content"] = doc.get("content")[0:550]
return doc