mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-31 13:58:04 -06:00
Update serialisers.py
This commit is contained in:
@@ -2260,10 +2260,7 @@ class ShareLinkBundleSerializer(OwnedObjectSerializer):
|
||||
return share_link_bundle
|
||||
|
||||
def get_document_count(self, obj: ShareLinkBundle) -> int:
|
||||
count = getattr(obj, "document_total", None)
|
||||
if count is not None:
|
||||
return count
|
||||
return obj.documents.count()
|
||||
return getattr(obj, "document_total") or obj.documents.count()
|
||||
|
||||
|
||||
class BulkEditObjectsSerializer(SerializerWithPerms, SetPermissionsMixin):
|
||||
|
||||
Reference in New Issue
Block a user