Skip to content

Commit

Permalink
Fix generating module documentation when default evaluates to False
Browse files Browse the repository at this point in the history
  • Loading branch information
mariolenz committed Nov 11, 2023
1 parent 1a8071e commit 0edcbf5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions changelogs/fragments/69-fix_default_documentation.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
bugfixes:
- Fix generating module documentation when default evaluates to False (https://github.com/ansible-community/ansible.content_builder/issues/69).
2 changes: 1 addition & 1 deletion plugins/action/generate_cloud_modules.py
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ def gen_documentation(
option["choices"] = sorted(parameter["enum"])
if parameter["type"] == "array":
option["elements"] = python_type(parameter["elements"])
if parameter.get("default"):
if parameter.get("default") is not None:
option["default"] = parameter.get("default")

documentation["options"][normalized_name] = option
Expand Down

0 comments on commit 0edcbf5

Please sign in to comment.