Skip to content

Commit

Permalink
fix crash when no og in client
Browse files Browse the repository at this point in the history
  • Loading branch information
msyyc committed Dec 23, 2024
1 parent 21d8448 commit 851fd6c
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ def _validate_code_model_options(self) -> None:
@staticmethod
def sort_exceptions(yaml_data: Dict[str, Any]) -> None:
for client in yaml_data["clients"]:
for group in client["operationGroups"]:
for group in client.get("operationGroups", []):
for operation in group["operations"]:
if not operation.get("exceptions"):
continue
Expand All @@ -262,7 +262,7 @@ def sort_exceptions(yaml_data: Dict[str, Any]) -> None:
@staticmethod
def remove_cloud_errors(yaml_data: Dict[str, Any]) -> None:
for client in yaml_data["clients"]:
for group in client["operationGroups"]:
for group in client.get("operationGroups", []):
for operation in group["operations"]:
if not operation.get("exceptions"):
continue
Expand Down

0 comments on commit 851fd6c

Please sign in to comment.