Fix DataValueEditor configuration handling + update naming to be more explicit (#14104)

This commit is contained in:
Kenn Jacobsen
2023-04-25 15:32:29 +02:00
committed by GitHub
parent d96346313e
commit d98f635eed
19 changed files with 65 additions and 44 deletions

View File

@@ -311,7 +311,7 @@ namespace Umbraco.Cms.Infrastructure.Persistence.Repositories.Implement
continue; // not implementing IDataValueTags, continue
}
object? configuration = DataTypeService.GetDataType(property.PropertyType.DataTypeId)?.ConfigurationObject;
object? configurationObject = DataTypeService.GetDataType(property.PropertyType.DataTypeId)?.ConfigurationObject;
if (property.PropertyType.VariesByCulture())
{
@@ -319,14 +319,14 @@ namespace Umbraco.Cms.Infrastructure.Persistence.Repositories.Implement
foreach (IPropertyValue pvalue in property.Values)
{
var languageId = LanguageRepository.GetIdByIsoCode(pvalue.Culture);
tags.AddRange(tagsProvider.GetTags(pvalue.EditedValue, configuration, languageId));
tags.AddRange(tagsProvider.GetTags(pvalue.EditedValue, configurationObject, languageId));
}
tagRepo.Assign(entity.Id, property.PropertyTypeId, tags);
}
else
{
IEnumerable<ITag> tags = tagsProvider.GetTags(property.GetValue(), configuration, null);
IEnumerable<ITag> tags = tagsProvider.GetTags(property.GetValue(), configurationObject, null);
tagRepo.Assign(entity.Id, property.PropertyTypeId, tags);
}
}