mirror of
https://github.com/apache/superset.git
synced 2026-04-25 02:55:07 +00:00
chore(command): Condense delete/bulk-delete operations (#24607)
Co-authored-by: Michael S. Molina <70410625+michael-s-molina@users.noreply.github.com>
This commit is contained in:
@@ -32,8 +32,8 @@ from superset.connectors.sqla.models import RowLevelSecurityFilter
|
||||
from superset.constants import MODEL_API_RW_METHOD_PERMISSION_MAP, RouteMethod
|
||||
from superset.daos.exceptions import DAOCreateFailedError, DAOUpdateFailedError
|
||||
from superset.extensions import event_logger
|
||||
from superset.row_level_security.commands.bulk_delete import BulkDeleteRLSRuleCommand
|
||||
from superset.row_level_security.commands.create import CreateRLSRuleCommand
|
||||
from superset.row_level_security.commands.delete import DeleteRLSRuleCommand
|
||||
from superset.row_level_security.commands.exceptions import RLSRuleNotFoundError
|
||||
from superset.row_level_security.commands.update import UpdateRLSRuleCommand
|
||||
from superset.row_level_security.schemas import (
|
||||
@@ -340,7 +340,7 @@ class RLSRestApi(BaseSupersetModelRestApi):
|
||||
"""
|
||||
item_ids = kwargs["rison"]
|
||||
try:
|
||||
BulkDeleteRLSRuleCommand(item_ids).run()
|
||||
DeleteRLSRuleCommand(item_ids).run()
|
||||
return self.response(
|
||||
200,
|
||||
message=ngettext(
|
||||
|
||||
Reference in New Issue
Block a user