Skip to content

Commit

Permalink
Fix condition building in matches_schedule_display.lua (#3318)
Browse files Browse the repository at this point in the history
  • Loading branch information
hjpalpha authored Sep 25, 2023
1 parent 5f72351 commit e821ea6
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -118,25 +118,25 @@ function MatchesTable:buildConditions()
conditions:add(pageConditions)

if config.startDate then
pageConditions:add(ConditionTree(BooleanOperator.any):add{
conditions:add(ConditionTree(BooleanOperator.any):add{
ConditionNode(ColumnName('date'), Comparator.eq, config.startDate),
ConditionNode(ColumnName('date'), Comparator.gt, config.startDate),
})
end

if config.endDate then
pageConditions:add(ConditionTree(BooleanOperator.any):add{
conditions:add(ConditionTree(BooleanOperator.any):add{
ConditionNode(ColumnName('date'), Comparator.eq, config.endDate),
ConditionNode(ColumnName('date'), Comparator.lt, config.endDate),
})
end

if config.matchSection then
pageConditions:add{ConditionNode(ColumnName('extradata_matchsection'), Comparator.eq, config.matchSection)}
conditions:add{ConditionNode(ColumnName('extradata_matchsection'), Comparator.eq, config.matchSection)}
end

if config.section then
pageConditions:add{ConditionNode(ColumnName('match2bracketdata_sectionheader'), Comparator.eq, config.section)}
conditions:add{ConditionNode(ColumnName('match2bracketdata_sectionheader'), Comparator.eq, config.section)}
end

return conditions:toString()
Expand Down

0 comments on commit e821ea6

Please sign in to comment.