validate hardcover api setting #1352

This commit is contained in:
FuzzyGrim
2026-05-23 17:03:16 +02:00
parent 3290c5e48a
commit 00a2467dbd
2 changed files with 6 additions and 1 deletions

View File

@@ -18,6 +18,7 @@ from decouple import (
undefined,
)
from django.core.cache import CacheKeyWarning
from django.core.exceptions import ImproperlyConfigured
BASE_URL = config("BASE_URL", default=None)
if BASE_URL:
@@ -424,6 +425,10 @@ HARDCOVER_API = config(
"j4MVAEi_-w2N7DuiMgAxkfVc6RuKd88AHrOyzF5xLyU",
),
)
HARDCOVER_API = HARDCOVER_API.strip()
if not HARDCOVER_API.startswith("Bearer "):
msg = "HARDCOVER_API must start with 'Bearer '."
raise ImproperlyConfigured(msg)
COMICVINE_API = config(
"COMICVINE_API",