errors: rework PermissionDeniedError #1559
Annotations
5 errors
|
Run tests:
invenio_records_resources/services/errors.py#L1
Black format check
--- /home/runner/work/invenio-records-resources/invenio-records-resources/invenio_records_resources/services/errors.py 2024-05-21 09:35:28.262841+00:00
+++ /home/runner/work/invenio-records-resources/invenio-records-resources/invenio_records_resources/services/errors.py 2024-05-21 09:38:29.933862+00:00
@@ -23,11 +23,12 @@
def __init__(self, action_name=None, record=None, *args, **kwargs):
"""Initialize exception."""
self.record = record
self.action_name = action_name
super(RecordPermissionDeniedError, self).__init__(*args, **kwargs)
-
+
+
class PermissionDeniedError(PermissionDenied):
"""Permission denied error."""
description = "Permission denied."
|
Run tests:
invenio_records_resources/services/records/service.py#L1
Black format check
--- /home/runner/work/invenio-records-resources/invenio-records-resources/invenio_records_resources/services/records/service.py 2024-05-21 09:35:28.262841+00:00
+++ /home/runner/work/invenio-records-resources/invenio-records-resources/invenio_records_resources/services/records/service.py 2024-05-21 09:38:41.017541+00:00
@@ -17,11 +17,14 @@
from invenio_search import current_search_client
from invenio_search.engine import dsl
from kombu import Queue
from werkzeug.local import LocalProxy
-from invenio_records_resources.services.errors import PermissionDeniedError, RecordPermissionDeniedError
+from invenio_records_resources.services.errors import (
+ PermissionDeniedError,
+ RecordPermissionDeniedError,
+)
from ..base import LinksTemplate, Service
from ..errors import RevisionIdMismatchError
from ..uow import RecordCommitOp, RecordDeleteOp, unit_of_work
from .schema import ServiceSchemaWrapper
|
Run tests:
invenio_records_resources/services/records/service.py#L1
isort-check
from kombu import Queue
from werkzeug.local import LocalProxy
-from invenio_records_resources.services.errors import PermissionDeniedError, RecordPermissionDeniedError
+from invenio_records_resources.services.errors import (
+ PermissionDeniedError,
+ RecordPermissionDeniedError,
+)
from ..base import LinksTemplate, Service
from ..errors import RevisionIdMismatchError
|
Run tests
The operation was canceled.
|
Loading