Skip to content

Commit

Permalink
Remove session condition from Firestore events query (#29114)
Browse files Browse the repository at this point in the history
Firestore only allows a single equality operation on queriers.
Reverting to prevent errors when viewing Audit Logs.
  • Loading branch information
rosstimothy committed Jul 14, 2023
1 parent c08e4dc commit bfc5a63
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion lib/events/firestoreevents/firestoreevents.go
Expand Up @@ -383,7 +383,6 @@ func (l *Log) searchEventsWithFilter(fromUTC, toUTC time.Time, namespace string,
}

query := l.svc.Collection(l.CollectionName).
Where(sessionIDDocProperty, "!=", ""). // exclude any non audit event documents in the collection
Where(eventNamespaceDocProperty, "==", apidefaults.Namespace).
Where(createdAtDocProperty, ">=", fromUTC.Unix()).
Where(createdAtDocProperty, "<=", toUTC.Unix())
Expand Down

0 comments on commit bfc5a63

Please sign in to comment.