Skip to content

Commit

Permalink
Handle None being passed to register_resource_outputs
Browse files Browse the repository at this point in the history
  • Loading branch information
Frassle committed Nov 2, 2022
1 parent f425ae3 commit e7ffa17
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
@@ -0,0 +1,4 @@
changes:
- type: fix
scope: sdk/python
description: Handle None being passed to register_resource_outputs.
3 changes: 3 additions & 0 deletions sdk/python/lib/pulumi/runtime/resource.py
Expand Up @@ -682,6 +682,9 @@ def register_resource_outputs(
):
async def do_register_resource_outputs():
urn = await res.urn.future()
# serialize_properties expects a collection (empty is fine) but not None, but this is called pretty
# much directly by users who could pass None in (although the type hints say they shouldn't).
outputs = {} if outputs is None else outputs
serialized_props = await rpc.serialize_properties(outputs, {})
log.debug(
f"register resource outputs prepared: urn={urn}, props={serialized_props}"
Expand Down

0 comments on commit e7ffa17

Please sign in to comment.