mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-09 08:15:27 +01:00
Dynamic counts include all pages, hide for "Any"
This commit is contained in:
parent
02875f5a34
commit
c59420581c
6 changed files with 31 additions and 10 deletions
|
|
@ -422,7 +422,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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue