moderation: added query match rule #2212
Annotations
6 errors
Run tests:
site/zenodo_rdm/moderation/config.py#L1
Black format check
--- /home/runner/work/zenodo-rdm/zenodo-rdm/site/zenodo_rdm/moderation/config.py 2024-11-06 13:59:29.851847+00:00
+++ /home/runner/work/zenodo-rdm/zenodo-rdm/site/zenodo_rdm/moderation/config.py 2024-11-06 14:08:20.625339+00:00
@@ -5,12 +5,17 @@
# ZenodoRDM is free software; you can redistribute it and/or modify
# it under the terms of the MIT License; see LICENSE file for more details.
"""Moderation config."""
-from .rules import (files_rule, links_rule, match_query_rule,
- text_sanitization_rule, verified_user_rule)
+from .rules import (
+ files_rule,
+ links_rule,
+ match_query_rule,
+ text_sanitization_rule,
+ verified_user_rule,
+)
MODERATION_BANNED_LINK_DOMAINS = []
"""Banned domains for links."""
MODERATION_SAFE_LINK_DOMAINS = []
|
Run tests:
site/zenodo_rdm/moderation/config.py#L1
isort-check
"""Moderation config."""
-from .rules import (files_rule, links_rule, match_query_rule,
- text_sanitization_rule, verified_user_rule)
+from .rules import (
+ files_rule,
+ links_rule,
+ match_query_rule,
+ text_sanitization_rule,
+ verified_user_rule,
+)
MODERATION_BANNED_LINK_DOMAINS = []
"""Banned domains for links."""
|
Run tests:
site/zenodo_rdm/moderation/handlers.py#L1
Black format check
--- /home/runner/work/zenodo-rdm/zenodo-rdm/site/zenodo_rdm/moderation/handlers.py 2024-11-06 13:59:29.852847+00:00
+++ /home/runner/work/zenodo-rdm/zenodo-rdm/site/zenodo_rdm/moderation/handlers.py 2024-11-06 14:08:22.109537+00:00
@@ -15,12 +15,11 @@
from invenio_rdm_records.services.components.verified import BaseHandler
from invenio_records_resources.services.uow import RecordCommitOp, TaskOp
from invenio_requests.tasks import request_moderation
from invenio_users_resources.proxies import current_users_service
from invenio_users_resources.records.api import UserAggregate
-from invenio_users_resources.services.users.tasks import \
- execute_moderation_actions
+from invenio_users_resources.services.users.tasks import execute_moderation_actions
from werkzeug.utils import cached_property
from .errors import UserBlockedException
from .proxies import current_scores
|
Run tests:
site/zenodo_rdm/moderation/handlers.py#L1
isort-check
from invenio_requests.tasks import request_moderation
from invenio_users_resources.proxies import current_users_service
from invenio_users_resources.records.api import UserAggregate
-from invenio_users_resources.services.users.tasks import \
- execute_moderation_actions
+from invenio_users_resources.services.users.tasks import execute_moderation_actions
from werkzeug.utils import cached_property
from .errors import UserBlockedException
|
Run tests:
site/zenodo_rdm/moderation/rules.py#L1
isort-check
from flask import current_app
from invenio_search import current_search_client
+
from zenodo_rdm.moderation.proxies import current_domain_tree
from .proxies import current_domain_tree, current_scores
|
Run tests
Process completed with exit code 1.
|
Loading