Service refactoring to "fully" enable segments (#19114)
* Refactor serverside content editing to support all variance combinations * Fix build errors * Reintroduce the tests ignored by #19060 --------- Co-authored-by: Mads Rasmussen <madsr@hey.com>
This commit is contained in:
@@ -17,10 +17,11 @@ public static class DocumentUpdateHelper
|
||||
{
|
||||
Segment = null,
|
||||
Culture = null,
|
||||
Name = createModel.InvariantName!,
|
||||
Name = createModel.Variants.FirstOrDefault(v => v.Culture is null && v.Segment is null)?.Name
|
||||
?? throw new ArgumentException("Could not find an invariant variant for the model name", nameof(createModel)),
|
||||
}
|
||||
];
|
||||
updateRequestModel.Values = createModel.InvariantProperties.Select(x => new DocumentValueModel
|
||||
updateRequestModel.Values = createModel.Properties.Select(x => new DocumentValueModel
|
||||
{
|
||||
Alias = x.Alias,
|
||||
Value = x.Value,
|
||||
@@ -44,10 +45,11 @@ public static class DocumentUpdateHelper
|
||||
{
|
||||
Segment = null,
|
||||
Culture = null,
|
||||
Name = createModel.InvariantName!,
|
||||
Name = createModel.Variants.FirstOrDefault(v => v.Culture is null && v.Segment is null)?.Name
|
||||
?? throw new ArgumentException("Could not find an invariant variant for the model name", nameof(createModel)),
|
||||
}
|
||||
];
|
||||
createDocumentRequestModel.Values = createModel.InvariantProperties.Select(x => new DocumentValueModel
|
||||
createDocumentRequestModel.Values = createModel.Properties.Select(x => new DocumentValueModel
|
||||
{
|
||||
Alias = x.Alias,
|
||||
Value = x.Value,
|
||||
|
||||
Reference in New Issue
Block a user