Skip to content

Commit

Permalink
refactor: don't use ISO deprecated field (#371)
Browse files Browse the repository at this point in the history
##### SUMMARY

The deprecated field is deprecated, we must use the deprecation object
instead.

##### COMPONENT NAME

hcloud_iso_info
  • Loading branch information
jooola authored Oct 23, 2023
1 parent f35f500 commit 41ea82c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion plugins/modules/hcloud_iso_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,9 @@ def _prepare_result(self):
"description": to_native(iso_info.description),
"type": iso_info.type,
"architecture": iso_info.architecture,
"deprecated": iso_info.deprecated,
"deprecated": (
iso_info.deprecation.unavailable_after if iso_info.deprecation is not None else None
),
"deprecation": {
"announced": iso_info.deprecation.announced.isoformat(),
"unavailable_after": iso_info.deprecation.unavailable_after.isoformat(),
Expand Down

0 comments on commit 41ea82c

Please sign in to comment.