Skip to content

Commit 2e1c34e

Browse files
authored
Merge pull request #4811 from wuxiaojun514/4808
Hotfix for Issue 4808
2 parents bfb9de4 + b9fcccf commit 2e1c34e

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
122122
- Fixed `-Description` and `-Sequence` not being applied when providing these through `Add-PnPApplicationCustomizer` [#4767](https://github.com/pnp/powershell/pull/4767)
123123
- Fixed `-RetryCount` parameter being ignored with `Submit-PnPSearchQuery` [#4784](https://github.com/pnp/powershell/pull/4784)
124124
- Fixed `Get-PnPSiteScriptFromWeb` throwing a file not found error when providing a web URL through `-Url` that differed from the connected to URL [#4785](https://github.com/pnp/powershell/pull/4785)
125+
- Fixed `Set-PnPListItem -Values @{}` passing in a taxonomy field with a guid typed value throwing an error [#4811](https://github.com/pnp/powershell/pull/4811)
125126

126127
### Removed
127128

src/Commands/Utilities/ListItemHelper.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ public static void SetFieldValues(this ListItem item, Hashtable valuesToSet, Bas
166166
var taxSession = clonedContext.Site.GetTaxonomySession();
167167
TaxonomyItem taxonomyItem = null;
168168
bool updateTaxItemValue = true;
169-
if (value != null && !Guid.TryParse(value as string, out termGuid))
169+
if (value != null && !Guid.TryParse(value?.ToString(), out termGuid))
170170
{
171171
// Assume it's a TermPath
172172
taxonomyItem = clonedContext.Site.GetTaxonomyItemByPath(value as string);

0 commit comments

Comments
 (0)