Skip to content

Commit 1a0d502

Browse files
1011302: code changes
1 parent 0b5a098 commit 1a0d502

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

  • Gantt/IntegrationWithNet10/Binding SQLite using GraphQL Adaptor/Blazor Web app/GanttGraphQL/Models

Gantt/IntegrationWithNet10/Binding SQLite using GraphQL Adaptor/Blazor Web app/GanttGraphQL/Models/GraphQLQuery.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -46,16 +46,16 @@ public async Task<TaskDataResponse> GetTaskData([GraphQLName("dataManager")] Dat
4646
query = DataOperations.PerformSearching(query, dm.Search);
4747
}
4848

49-
// 2) Filtering
50-
if (dm.Where is { Count: > 0 })
49+
// Filtering
50+
if (dm.Where != null && dm.Where.Count > 0)
5151
{
52-
// Base condition "and"/"or" (default to "and" if missing)
53-
string? baseCondition = dm.Where[0].Condition ?? dm.Where[0].Operator;
54-
if (string.IsNullOrWhiteSpace(baseCondition)) baseCondition = "and";
55-
56-
query = DataOperations.PerformFiltering(query, dm.Where, baseCondition);
52+
if (dm.Where[0].Field != null && dm.Where[0].Field == nameof(TaskDataModel.ParentID)) { }
53+
else
54+
{
55+
query = DataOperations.PerformFiltering(query, dm.Where, dm.Where[0].Operator);
56+
}
5757
}
58-
58+
5959
// 3) Sorting (multi-column supported)
6060
if (dm.Sorted is { Count: > 0 })
6161
{

0 commit comments

Comments
 (0)