diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/ApplicationConfigurations/ObjectExtending/CachedObjectExtensionsDtoService.cs b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/ApplicationConfigurations/ObjectExtending/CachedObjectExtensionsDtoService.cs index 22102f82c5..8e5d205867 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/ApplicationConfigurations/ObjectExtending/CachedObjectExtensionsDtoService.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/ApplicationConfigurations/ObjectExtending/CachedObjectExtensionsDtoService.cs @@ -141,18 +141,23 @@ namespace Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending OnTable = new ExtensionPropertyUiTableDto { IsVisible = propertyConfig.UI.OnTable.IsVisible - }, - Lookup = new ExtensionPropertyUiLookupDto - { - Url = propertyConfig.UI.Lookup.Url, - ResultListPropertyName = propertyConfig.UI.Lookup.ResultListPropertyName, - DisplayPropertyName = propertyConfig.UI.Lookup.DisplayPropertyName, - ValuePropertyName = propertyConfig.UI.Lookup.ValuePropertyName, - FilterParamName = propertyConfig.UI.Lookup.FilterParamName } } }; + if (!propertyConfig.UI.Lookup.Url.IsNullOrEmpty()) + { + extensionPropertyDto.Ui.Lookup = new ExtensionPropertyUiLookupDto + { + Url = propertyConfig.UI.Lookup.Url, + ResultListPropertyName = propertyConfig.UI.Lookup.ResultListPropertyName, + DisplayPropertyName = propertyConfig.UI.Lookup.DisplayPropertyName, + ValuePropertyName = propertyConfig.UI.Lookup.ValuePropertyName, + FilterParamName = propertyConfig.UI.Lookup.FilterParamName + }; + } + + foreach (var attribute in propertyConfig.Attributes) { extensionPropertyDto.Attributes.Add(