Skip to content

Commit bc40cf2

Browse files
authored
Merge branch 'main' into v1.6742.0
2 parents f276e9c + be0d82a commit bc40cf2

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

scaleway-core/scaleway_core/utils/resolve_one_of.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,13 @@ def resolve_one_of(
2828
# Get the first non-empty default
2929
for possibility in possibilities:
3030
if possibility.default is not None:
31+
if possibility.marshal_func is not None:
32+
# When no actual value, call with None as value
33+
return {
34+
possibility.param: possibility.marshal_func(
35+
None, possibility.default
36+
)
37+
}
3138
return {possibility.param: possibility.default}
3239

3340
# If required, raise an error

0 commit comments

Comments
 (0)