Browse Source

move securiy service error explanation from comment

Change-Id: If81d6cfd41e8aec63aaa95f3190eec44d7d2fc01
Maurice Schreiber 1 year ago
parent
commit
f1b20cd4a9
No account linked to committer's email address
1 changed files with 3 additions and 3 deletions
  1. 3
    3
      manila/api/v1/security_service.py

+ 3
- 3
manila/api/v1/security_service.py View File

@@ -66,9 +66,9 @@ class SecurityServiceController(wsgi.Controller):
66 66
         share_nets = db.share_network_get_all_by_security_service(
67 67
             context, id)
68 68
         if share_nets:
69
-            # Cannot delete security service
70
-            # if it is assigned to share networks
71
-            raise exc.HTTPForbidden()
69
+            msg = _("Cannot delete security service. It is "
70
+                    "assigned to share network(s)")
71
+            raise exc.HTTPForbidden(explanation=msg)
72 72
         policy.check_policy(context, RESOURCE_NAME,
73 73
                             'delete', security_service)
74 74
         db.security_service_delete(context, id)

Loading…
Cancel
Save