Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix ! explicit environment variables #100

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading