Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/Commands/Model/SPOSite.cs
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ public class SPOSite
public bool IsGroupOwnerSiteAdmin { get; set; }
public bool ListsShowHeaderAndNavigation { get; set; }
public int LockReason { get; set; }
public bool HasHolds { get; set; }
public int MajorVersionLimit { get; set; }
public int MajorWithMinorVersionsLimit { get; set; }
public bool RestrictedAccessControl { get; set; }
Expand Down Expand Up @@ -186,6 +187,7 @@ public SPOSite(SiteProperties props, bool? disableSharingForNonOwnersStatus)
IsGroupOwnerSiteAdmin = props.IsGroupOwnerSiteAdmin;
ListsShowHeaderAndNavigation = props.ListsShowHeaderAndNavigation;
LockReason = props.LockReason;
HasHolds = props.HasHolds;
MajorVersionLimit = props.MajorVersionLimit;
MajorWithMinorVersionsLimit = props.MajorWithMinorVersionsLimit;
RestrictedAccessControl = props.RestrictedAccessControl;
Expand Down
2 changes: 1 addition & 1 deletion src/Commands/Utilities/ListItemHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -571,7 +571,7 @@ public static Dictionary<string, object> GetFieldValues(PnP.Core.Model.SharePoin
if (choices is string)
{
// Handle comma or semicolon separated string
itemValue = string.Join(";#", ((string)choices).Split([',', ';'], StringSplitOptions.RemoveEmptyEntries).Select(c => c.Trim()));
itemValue = string.Join(";#", ((string)choices).Split(new char[] { ',', ';' }, StringSplitOptions.RemoveEmptyEntries).Select(c => c.Trim()));
}
else if (choices is Array)
{
Expand Down
11 changes: 11 additions & 0 deletions src/Tests/Admin/GetPnPTenantSiteTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,17 @@ public void GetPnPTenantSiteTest()
Assert.IsNotNull(results);
}
}

[TestMethod]
public void SPOSiteModelHasHoldsPropertyTest()
{
// Test that the SPOSite model has the HasHolds property
var spoSiteType = typeof(PnP.PowerShell.Commands.Model.SPOSite);
var hasHoldsProperty = spoSiteType.GetProperty("HasHolds");

Assert.IsNotNull(hasHoldsProperty, "HasHolds property should exist on SPOSite model");
Assert.AreEqual(typeof(bool), hasHoldsProperty.PropertyType, "HasHolds property should be of type bool");
}
#endregion
}
}
Expand Down
Loading