From 7b11ff1af6dc6e9b71a6ffd3d670f6ec433b46f5 Mon Sep 17 00:00:00 2001 From: Nicolas Mowen Date: Sun, 25 Feb 2024 15:36:18 -0700 Subject: [PATCH] Fix reviewed filter (#10039) --- frigate/http.py | 2 +- web/src/components/filter/ReviewFilterGroup.tsx | 8 ++++---- web/src/pages/Events.tsx | 10 +++++----- web/src/types/review.ts | 2 +- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/frigate/http.py b/frigate/http.py index c496be82b..b2ff9fa79 100644 --- a/frigate/http.py +++ b/frigate/http.py @@ -2426,7 +2426,7 @@ def review(): label_clause = reduce(operator.or_, label_clauses) clauses.append((label_clause)) - if reviewed == 1: + if reviewed == 0: clauses.append((ReviewSegment.has_been_reviewed == False)) if severity: diff --git a/web/src/components/filter/ReviewFilterGroup.tsx b/web/src/components/filter/ReviewFilterGroup.tsx index ef51da673..eb71daa22 100644 --- a/web/src/components/filter/ReviewFilterGroup.tsx +++ b/web/src/components/filter/ReviewFilterGroup.tsx @@ -90,7 +90,7 @@ export default function ReviewFilterGroup({ updateLabelFilter={(newLabels) => { onUpdateFilter({ ...filter, labels: newLabels }); }} - showReviewed={filter?.showReviewed || false} + showReviewed={filter?.showReviewed || 0} setShowReviewed={(reviewed) => onUpdateFilter({ ...filter, showReviewed: reviewed }) } @@ -228,8 +228,8 @@ type GeneralFilterButtonProps = { allLabels: string[]; selectedLabels: string[] | undefined; updateLabelFilter: (labels: string[] | undefined) => void; - showReviewed: boolean; - setShowReviewed: (reviewed: boolean) => void; + showReviewed?: 0 | 1; + setShowReviewed: (reviewed?: 0 | 1) => void; }; function GeneralFilterButton({ allLabels, @@ -256,7 +256,7 @@ function GeneralFilterButton({