mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2026-10-25 09:08:55 +00:00
Chore: type the set-permissions dict
Callers passed whatever they had, including querysets of User and Group objects that only worked because id__in accepts a subquery.
This commit is contained in:
1 parent
f6153e962e
commit
ea4307e3e5
6 files changed
+48
-21
No files matched your search
@@ -36,6 +36,7 @@ from documents.models import DocumentType
|
||||
from documents.models import PaperlessTask
|
||||
from documents.models import StoragePath
|
||||
from documents.models import Tag
|
||||
from documents.permissions import PermissionsSpec
|
||||
from documents.permissions import set_permissions_for_objects
|
||||
from documents.plugins.helpers import DocumentsStatusManager
|
||||
from documents.tasks import bulk_update_documents
|
||||
@@ -452,7 +453,7 @@ def reprocess(doc_ids: list[int], *, remote_ocr: bool = False) -> Literal["OK"]:
|
||||
|
||||
def set_permissions(
|
||||
doc_ids: list[int],
|
||||
set_permissions: dict,
|
||||
set_permissions: PermissionsSpec,
|
||||
*,
|
||||
owner: User | None = None,
|
||||
merge: bool = False,
|
||||
|
||||
Reference in new issue
Block a user