Skip to content

Commit

Permalink
fix ! explicit environment variables
Browse files Browse the repository at this point in the history
  • Loading branch information
vitali-yanushchyk-valor committed Oct 18, 2024
1 parent caa0ea8 commit 7c304e1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -174,12 +174,8 @@ def handle(self, *args: Any, **options: Any) -> None: # noqa: C901
verbosity=self.verbosity - 1,
interactive=False,
)

admin = User.objects.get(email=self.admin_email)
else:
admin = User.objects.filter(is_superuser=True).first()
if not admin:
raise CommandError("Failure: Error when creating an admin user!")
echo("No admin email provided, skip superuser creation")

from hope_dedup_engine.apps.security.constants import DEFAULT_GROUP_NAME

Expand Down
1 change: 0 additions & 1 deletion src/hope_dedup_engine/apps/faces/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ def sync_dnn_files(self, request):
else:
worker_count = len(active_workers)
if worker_count > 1:
print(f"{worker_count=}")
job = group(sync_dnn_files.s(force=True) for _ in range(worker_count))
result = job.apply_async()
self.message_user(
Expand Down
4 changes: 2 additions & 2 deletions src/hope_dedup_engine/config/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class Group(Enum):
CONFIG: "Dict[str, ConfigItem]" = {
"ADMIN_EMAIL": (
str,
SmartEnv.NOTSET,
"",
"admin",
True,
"Initial user created at first deploy",
Expand Down Expand Up @@ -100,7 +100,7 @@ class Group(Enum):
False,
f"{celery_doc}#broker-transport-options",
),
"CSRF_COOKIE_SECURE": (bool, True, False, setting("csrf-cookie-secure")),
"CSRF_COOKIE_SECURE": (bool, True, False, False, setting("csrf-cookie-secure")),
"DATABASE_URL": (
str,
SmartEnv.NOTSET,
Expand Down

0 comments on commit 7c304e1

Please sign in to comment.