Skip to content

Commit 1ebc5c4

Browse files
committed
fix: patch content
1 parent 890a27f commit 1ebc5c4

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/aaz_dev/cli/controller/az_operation_generator.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,8 @@ def __init__(self, name, cmd_ctx, operation, client_endpoints):
124124
else:
125125
raise NotImplementedError()
126126

127-
if self.ref is not None and self._json.schema is not None:
128-
self.patch_content = AzHttpRequestPatchContentGenerator(self._cmd_ctx, body)
127+
if self.content.ref is not None and self.content._json.schema is not None:
128+
self.patch_content = AzHttpRequestPatchContentGenerator(self._cmd_ctx, body)
129129

130130
@property
131131
def url(self):

src/aaz_dev/cli/templates/aaz/command/_cmd.py.j2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -489,7 +489,7 @@ class {{ leaf.cls_name }}(
489489

490490
@property
491491
def content(self):
492-
{%- if op.content.patch_content is not none -%}
492+
{%- if op.patch_content is not none -%}
493493

494494
{%- if op.method == "PATCH" %}
495495
{%- set valid_ops = leaf.operations | selectattr("is_selector_variant") | list %}

0 commit comments

Comments
 (0)