Skip to content

Commit 5c1a2cf

Browse files
committed
use stream content
1 parent 5d0eedb commit 5c1a2cf

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

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

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -562,7 +562,7 @@ class {{ leaf.cls_name }}(
562562

563563
@property
564564
def content(self):
565-
return self.ctx.file_content if self.ctx.file_content else self.ctx.file_handler
565+
return self.ctx.file_content
566566
{%- endif %}
567567

568568
{%- if op.form_content is not none %}
@@ -573,6 +573,13 @@ class {{ leaf.cls_name }}(
573573
return None
574574
{%- endif %}
575575

576+
{%- if op.content is not none and op.content_as_binary is not none %}
577+
578+
@property
579+
def stream_content(self):
580+
return self.ctx.file_handler
581+
{%- endif %}
582+
576583
{%- if op.stream_content is not none %}
577584

578585
@property

0 commit comments

Comments
 (0)