Skip to content

Set null if parameter AvailableToOtherTenants is not set #11024

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 5, 2020

Conversation

dingmeng-xue
Copy link
Member

Fix issue #10965
If AvailableToOtherTenants is not set, set null for update operation

@dingmeng-xue dingmeng-xue added this to the S165 (2020-02-18) milestone Feb 4, 2020
Copy link
Member

@isra-fel isra-fel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change looks good to me. Please add a change log entry, thanks

@@ -102,7 +102,7 @@ public override void ExecuteCmdlet()
Homepage = HomePage,
IdentifierUris = IdentifierUri,
ReplyUrls = ReplyUrl,
AvailableToOtherTenants = AvailableToOtherTenants
AvailableToOtherTenants = MyInvocation.BoundParameters.ContainsKey("AvailableToOtherTenants") ? AvailableToOtherTenants : (bool?)null
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggest to use IsParamaterBound to determine whether parameter is provided, just as line 90:

AvailableToOtherTenants = this.IsParameterBound(c => c.AvailableToOtherTenants ) ? AvailableToOtherTenants : (bool?)null;

Copy link
Member

@erich-wang erich-wang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just added one minor comment above

@isra-fel isra-fel dismissed erich-wang’s stale review February 5, 2020 06:27

updated with IsParameterBound()

@isra-fel isra-fel merged commit cf0bff8 into Azure:master Feb 5, 2020
@dingmeng-xue dingmeng-xue deleted the resource-fix branch February 6, 2020 05:54
dingmeng-xue pushed a commit to dingmeng-xue/azure-powershell that referenced this pull request Mar 29, 2020
Set null if parameter AvailableToOtherTenants is not set
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants