Skip to content

Commit

Permalink
fix: Resolve error in handle_updates when key is not valid (#496)
Browse files Browse the repository at this point in the history
* Check that property_metadata is not None before referencing

* oops

* oops

* Replace key in with .get(key) is not None
  • Loading branch information
lgarber-akamai authored Apr 18, 2024
1 parent efe0ea5 commit 352efc8
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion plugins/module_utils/linode_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,11 @@ def handle_updates(
# We should convert properties to sets
# if they are annotated as unordered in the
# Python SDK.
if property_metadata.get(key).unordered:
if (
property_metadata is not None
and property_metadata.get(key) is not None
and property_metadata.get(key).unordered
):
has_diff = set(old_value) != set(new_value)

if has_diff:
Expand Down

0 comments on commit 352efc8

Please sign in to comment.