Skip to content

Commit

Permalink
t
Browse files Browse the repository at this point in the history
Signed-off-by: Jens Langhammer <jens@goauthentik.io>
  • Loading branch information
BeryJu committed Jul 24, 2024
1 parent ec73ade commit be7502b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lifecycle/system_migrations/tenant_files.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# flake8: noqa
from pathlib import Path

from authentik.lib.config import CONFIG
from lifecycle.migrate import BaseMigration

MEDIA_ROOT = Path(__file__).parent.parent.parent / "media"
Expand All @@ -12,6 +13,8 @@ def needs_migration(self) -> bool:
return not TENANT_MEDIA_ROOT.exists()

def run(self):
if CONFIG.get("storage.media.backend", "file") == "s3":
return
TENANT_MEDIA_ROOT.mkdir(parents=True)
for d in ("application-icons", "source-icons", "flow-backgrounds"):
if (MEDIA_ROOT / d).exists():
Expand Down

0 comments on commit be7502b

Please sign in to comment.