Skip to content

Commit

Permalink
Merge pull request #92 from SEKOIA-IO/fix/json_arg
Browse files Browse the repository at this point in the history
fix json arg fonction
  • Loading branch information
rombernier authored Nov 6, 2023
2 parents e651d84 + 67b09c0 commit 6b76cd0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
### Fixed

- Fix json_argument fonction when url arg is empty or None

## [1.6.1] - 2023-11-06

Expand Down
2 changes: 1 addition & 1 deletion sekoia_automation/action.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ def json_argument(self, name: str, arguments: dict, required: bool = True) -> An
If `name` is inside arguments, returns the value.
If `name`_path is inside arguments, returns the content of the file
"""
if name in arguments:
if arguments.get(name, None):
self._result_as_file = False
return arguments[name]
elif f"{name}_path" in arguments:
Expand Down

0 comments on commit 6b76cd0

Please sign in to comment.