Propagate the default/required properties of a parameter upon merge.
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Fabio Manganiello 2023-09-30 14:57:11 +02:00
parent 1732bfa82c
commit 9e489bb5cf
Signed by: blacklight
GPG Key ID: D90FBA7F76362774
1 changed files with 10 additions and 0 deletions

View File

@ -79,6 +79,16 @@ class IntegrationMetadata:
if param.doc and not params[param_name].doc:
params[param_name].doc = param.doc
# If the new parameter has required=False,
# then that should also be the value for the current ones
if param.required is False:
params[param_name].required = False
# If the new parameter has a default value, and the current
# one doesn't, then the default value should be set as the new one.
if param.default is not None and params[param_name].default is None:
params[param_name].default = param.default
@classmethod
def _merge_actions(cls, actions: Dict[str, Action], new_actions: Dict[str, Action]):
"""