mirror of https://github.com/jumpserver/jumpserver
fix: metadata api view 报错
parent
a809eac2b8
commit
a9bdbcf7c6
|
@ -32,7 +32,9 @@ class SimpleMetadataWithFilters(SimpleMetadata):
|
||||||
"""
|
"""
|
||||||
actions = {}
|
actions = {}
|
||||||
for method in self.methods & set(view.allowed_methods):
|
for method in self.methods & set(view.allowed_methods):
|
||||||
view.action = view.action_map.get(method.lower(), view.action)
|
if hasattr(view, 'action_map'):
|
||||||
|
view.action = view.action_map.get(method.lower(), view.action)
|
||||||
|
|
||||||
view.request = clone_request(request, method)
|
view.request = clone_request(request, method)
|
||||||
try:
|
try:
|
||||||
# Test global permissions
|
# Test global permissions
|
||||||
|
|
Loading…
Reference in New Issue