fix: group dns respect their character limit

This commit is contained in:
rladenson 2024-10-03 22:52:57 -06:00
parent 9a6254c01f
commit 395cc194a8

View file

@ -191,6 +191,8 @@ public class Groups
else
{
var newDisplayName = ctx.RemainderOrNull(false).NormalizeLineEndSpacing();
if (newDisplayName.Length > Limits.MaxGroupNameLength)
throw new PKError($"Group name too long ({newDisplayName.Length}/{Limits.MaxGroupNameLength} characters).");
var patch = new GroupPatch { DisplayName = Partial<string>.Present(newDisplayName) };
await ctx.Repository.UpdateGroup(target.Id, patch);