Skip to content

Commit 2ea36e1

Browse files
authored
Merge pull request #202 from dotnetcore/bugfix/on-syslog-page-can-not-loading-app-list
Fixbug: can not search app when sort direction is null
2 parents 3177b04 + 73bb0ac commit 2ea36e1

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/AgileConfig.Server.Apisite/AgileConfig.Server.Apisite.csproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
<PropertyGroup>
44
<TargetFramework>net8.0</TargetFramework>
55
<AspNetCoreHostingModel>InProcess</AspNetCoreHostingModel>
6-
<AssemblyVersion>1.9.8</AssemblyVersion>
7-
<Version>1.9.7</Version>
8-
<PackageVersion>1.9.8</PackageVersion>
6+
<AssemblyVersion>1.9.9</AssemblyVersion>
7+
<Version>1.9.9</Version>
8+
<PackageVersion>1.9.9</PackageVersion>
99
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
10-
<FileVersion>1.9.8</FileVersion>
10+
<FileVersion>1.9.9</FileVersion>
1111
<Authors>kklldog</Authors>
1212
<Company>kklldog</Company>
1313
</PropertyGroup>

src/AgileConfig.Server.Service/AppService.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ public Task<List<App>> GetAllAppsAsync()
159159
}
160160

161161
var apps = await _appRepository.QueryPageAsync(exp, current, pageSize, sortField,
162-
ascOrDesc.StartsWith("asc") ? "ASC" : "DESC");
162+
ascOrDesc?.StartsWith("asc") ?? true ? "ASC" : "DESC");
163163
var count = await _appRepository.CountAsync(exp);
164164

165165
return (apps, count);
@@ -230,7 +230,7 @@ public Task<List<App>> GetAllAppsAsync()
230230

231231
if (sortProperty.TryGetValue(sortField, out var propertyInfo))
232232
{
233-
appGroupList = ascOrDesc.StartsWith("asc")
233+
appGroupList = ascOrDesc?.StartsWith("asc") ?? true
234234
? appGroupList.OrderBy(x => propertyInfo.GetValue(x.App, null)).ToList()
235235
: appGroupList.OrderByDescending(x => propertyInfo.GetValue(x.App, null)).ToList();
236236
}

0 commit comments

Comments
 (0)