Skip to content

Commit

Permalink
issue beer-garden#23 added default values
Browse files Browse the repository at this point in the history
  • Loading branch information
west270 committed Dec 20, 2021
1 parent 9c422e5 commit 14c2609
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion deploy/deploy/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def base64_command(self, the_base64):
return the_base64

@parameter(key="the_base64", type="Base64", optional=True, nullable=True)
def base64_command_optional(self, the_base64):
def base64_command_optional(self, the_base64=None):
if the_base64:
return the_base64
else:
Expand Down
3 changes: 2 additions & 1 deletion file-bytes/file_bytes/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ def echo_md5sum(self, some_file):
"""Returns the md5sum of a provided file"""
return hashlib.md5(some_file).hexdigest()

def echo_md5sum_optional(self, file_upload):
@parameter(key="file_upload", type="Bytes", optional=True, nullable=True)
def echo_md5sum_optional(self, file_upload=None):
"""Returns the md5sum of a provided file"""
if file_upload:
return hashlib.md5(file_upload).hexdigest()
Expand Down

0 comments on commit 14c2609

Please sign in to comment.