You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
django_filters.filterset.filter_queryset() runs the filters in a loop.
/api/v2/incidents/?acked=true&stateful=true wind up callingl queryset.acked().stateful(). This is equivalent to
'SELECT "argus_incident_incident"."id", "argus_incident_incident"."start_time",
"argus_incident_incident"."end_time","argus_incident_incident"."source_id",
"argus_incident_incident"."source_incident_id", "argus_incident_incident"."details_url",
"argus_incident_incident"."description", "argus_incident_incident"."level",
"argus_incident_incident"."ticket_url" FROM "argus_incident_incident"
WHERE (
"argus_incident_incident"."id" IN (
SELECT DISTINCT U1."incident_id" FROM "argus_incident_acknowledgement" U0
INNER JOIN "argus_incident_event" U1 ON (U0."event_id" = U1."id"
) WHERE NOT (U0."expiration" <= 2022-03-07 11:33:15.190594+00:00 AND U0."expiration" IS NOT NULL)
)
AND "argus_incident_incident"."end_time" IS NOT NULL
)
ORDER BY "argus_incident_incident"."start_time" DESC'
We need to verify what the filterset does when given more than one flag: OR or AND. We want AND most of the time.
Originally posted by @hmpf in #206 (comment)
The text was updated successfully, but these errors were encountered: