fix(esppSync): шорткоды применяются только к полям с типом string
This commit is contained in:
@@ -127,12 +127,16 @@ namespace PARR.EsppSync
|
||||
|
||||
foreach (PropertyInfo property in properties)
|
||||
{
|
||||
var value = property.GetValue(dbObjectInEsppObject)?.ToString();
|
||||
var type = property.PropertyType;
|
||||
if(type == typeof(string)){
|
||||
// только для стрингов проверяем шорткоды
|
||||
var value = property.GetValue(dbObjectInEsppObject)?.ToString();
|
||||
|
||||
if (value != null)
|
||||
{
|
||||
var processedValue = await shortcodesService.ApplyShortcodesAsync(value, templateForShortcodes);
|
||||
property.SetValue(dbObjectInEsppObject, processedValue);
|
||||
if (value != null)
|
||||
{
|
||||
var processedValue = await shortcodesService.ApplyShortcodesAsync(value, templateForShortcodes);
|
||||
property.SetValue(dbObjectInEsppObject, processedValue);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user