diff --git a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/DataSourceApi.cs b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/DataSourceApi.cs index fcd7c4bba..547e6727a 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/DataSourceApi.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/DataSourceApi.cs @@ -40,13 +40,17 @@ namespace Learun.Application.WebApi.Modules } else { + if (data.Rows.Count > 0) { - foreach (DataRow item in data.Rows) + if (data.Columns.Contains("f_password")&&data.Columns.Contains("f_mobile")&&data.Columns.Contains("f_identitycardno")) { - item["f_password"] = ""; - item["f_mobile"] = ""; - item["f_identitycardno"] = ""; + foreach (DataRow item in data.Rows) + { + item["f_password"] = ""; + item["f_mobile"] = ""; + item["f_identitycardno"] = ""; + } } } var jsondata = new