Skip to content

Commit

Permalink
Fix REST methods with versioned API (#13977)
Browse files Browse the repository at this point in the history
Due to changes in behavior with new api_method decorator the
_private attribute is always present for these methods and so
we must explicitly check for whether it is True.
  • Loading branch information
anodos325 authored Jul 4, 2024
1 parent aa6b825 commit 6387846
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/middlewared/middlewared/service/core_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ def get_methods(self, app, service, target):
continue

# Skip private methods
if hasattr(method, '_private'):
if hasattr(method, '_private') and method._private is True:
continue
if target == 'CLI' and hasattr(method, '_cli_private'):
continue
Expand Down

0 comments on commit 6387846

Please sign in to comment.