Skip to content

Commit eaa3269

Browse files
committed
Remove restrictions if none are applicable
1 parent 14b6b94 commit eaa3269

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

Sources/DataTransferObjects/Query/CustomQuery+CompileDown.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,8 @@ public extension CustomQuery {
125125
if let applicableRestrictions = Self.getApplicableRestrictions(from: query) {
126126
query.restrictions = applicableRestrictions
127127
query.filter = query.filter && Filter.not(.init(field: Filter.interval(.init(dimension: "__time", intervals: applicableRestrictions))))
128+
} else {
129+
query.restrictions = nil
128130
}
129131

130132
// Update compilationStatus so the next steps in the pipeline are sure the query has been compiled

0 commit comments

Comments
 (0)