Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fixed audit when deleting a remote service #1593

Merged
merged 4 commits into from
Sep 14, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion apiserver/paasng/paasng/accessories/servicehub/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,7 @@ def unbind(self, request, code, module_name, service_id):
"""删除一个服务绑定关系"""
application = self._get_application_by_code(code)
module = application.get_module(module_name)
service = self.get_service(service_id, application)

# Check if application was protected
raise_if_protected(application, ProtectedRes.SERVICES_MODIFICATIONS)
Expand All @@ -252,7 +253,7 @@ def unbind(self, request, code, module_name, service_id):
action_id=AppAction.MANAGE_ADDONS_SERVICES,
operation=OperationEnum.DISABLE,
target=OperationTarget.ADD_ON,
attribute=module_attachment.service.name,
attribute=service.name,
module_name=module_name,
data_before=DataDetail(type=DataType.RAW_DATA, data=module_attachment.service.config),
)
Expand Down