From e935db507531754f44b590559e021e08e464a34d Mon Sep 17 00:00:00 2001 From: Nicolas Mowen Date: Wed, 25 Sep 2024 07:01:08 -0600 Subject: [PATCH] Api fixes (#13955) * Fix false positive submission * Make sure None is not sent as rate limit --- frigate/api/event.py | 2 +- frigate/api/fastapi_app.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/frigate/api/event.py b/frigate/api/event.py index f897741ee..74e93b5dd 100644 --- a/frigate/api/event.py +++ b/frigate/api/event.py @@ -768,7 +768,7 @@ def false_positive(request: Request, event_id: str): ) if not event.plus_id: - plus_response = send_to_plus(event_id) + plus_response = send_to_plus(request, event_id) if plus_response.status_code != 200: return plus_response # need to refetch the event now that it has a plus_id diff --git a/frigate/api/fastapi_app.py b/frigate/api/fastapi_app.py index fb6e4df0b..3980e0b40 100644 --- a/frigate/api/fastapi_app.py +++ b/frigate/api/fastapi_app.py @@ -83,7 +83,7 @@ def create_fastapi_app( return response # Rate limiter (used for login endpoint) - auth.rateLimiter.set_limit(frigate_config.auth.failed_login_rate_limit) + auth.rateLimiter.set_limit(frigate_config.auth.failed_login_rate_limit or "") app.state.limiter = limiter app.add_exception_handler(RateLimitExceeded, _rate_limit_exceeded_handler) app.add_middleware(SlowAPIMiddleware)