Skip to content

Errors: Add CommunityNotSelectedError for conditional check on config #1634

Errors: Add CommunityNotSelectedError for conditional check on config

Errors: Add CommunityNotSelectedError for conditional check on config #1634

Triggered via pull request September 16, 2024 15:17
Status Failure
Total duration 3m 57s
Artifacts

tests.yml

on: pull_request
Matrix: Tests / Tests
Fit to window
Zoom out
Zoom in

Annotations

6 errors
Tests / Tests (3.9, postgresql14, opensearch2): invenio_records_resources/resources/errors.py#L1
isort-check from ..errors import validation_error_to_list_errors from ..services.errors import ( + CannotRemoveCommunityError, + CommunityNotSelectedError, FacetNotFoundError, FailedFileUploadException, FileKeyNotFoundError, QuerystringValidationError, RecordPermissionDeniedError, RevisionIdMismatchError, - CommunityNotSelectedError, - CannotRemoveCommunityError, )
Tests / Tests (3.9, postgresql14, opensearch2): 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-09-16 15:17:54.098143+00:00 +++ /home/runner/work/invenio-records-resources/invenio-records-resources/invenio_records_resources/services/errors.py 2024-09-16 15:20:34.389149+00:00 @@ -115,17 +115,14 @@ class CommunityNotSelectedError(Exception): """Error thrown when a record is being created/updated with less than 1 community.""" def __init__(self): """Constructor.""" - super().__init__( - _("Cannot publish without selecting a community.") - ) + super().__init__(_("Cannot publish without selecting a community.")) + class CannotRemoveCommunityError(Exception): """Error thrown when the last community is being removed from the record.""" def __init__(self): """Constructor.""" - super().__init__( - _("A record should be part of atleast 1 community.") - ) + super().__init__(_("A record should be part of atleast 1 community."))
Tests / Tests (3.9, postgresql14, opensearch2)
Process completed with exit code 1.
Tests / Tests (3.12, postgresql14, opensearch2): invenio_records_resources/resources/errors.py#L1
isort-check from ..errors import validation_error_to_list_errors from ..services.errors import ( + CannotRemoveCommunityError, + CommunityNotSelectedError, FacetNotFoundError, FailedFileUploadException, FileKeyNotFoundError, QuerystringValidationError, RecordPermissionDeniedError, RevisionIdMismatchError, - CommunityNotSelectedError, - CannotRemoveCommunityError, )
Tests / Tests (3.12, postgresql14, opensearch2): 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-09-16 15:17:56.019520+00:00 +++ /home/runner/work/invenio-records-resources/invenio-records-resources/invenio_records_resources/services/errors.py 2024-09-16 15:21:04.545785+00:00 @@ -115,17 +115,14 @@ class CommunityNotSelectedError(Exception): """Error thrown when a record is being created/updated with less than 1 community.""" def __init__(self): """Constructor.""" - super().__init__( - _("Cannot publish without selecting a community.") - ) + super().__init__(_("Cannot publish without selecting a community.")) + class CannotRemoveCommunityError(Exception): """Error thrown when the last community is being removed from the record.""" def __init__(self): """Constructor.""" - super().__init__( - _("A record should be part of atleast 1 community.") - ) + super().__init__(_("A record should be part of atleast 1 community."))
Tests / Tests (3.12, postgresql14, opensearch2)
Process completed with exit code 1.