update api export for executive and fixing closing cycle flow

This commit is contained in:
Alberto-Audrix committed 2026-09-15 16:53:25 +07:00
1 parent d0d1ae7d24
commit 07d36081ce
23 files changed
+1378 -101

No files matched your search

@@ -109,13 +109,13 @@ class Command(BaseCommand):
stdout=self.stdout,
)
bootstrap_key = settings.BOOTSTRAP_API_KEY
bootstrap_key = settings.SITE_API_KEY
if bootstrap_key:
api_key, _ = ApiKey.generate(admin, "bootstrap")
api_key, _ = ApiKey.generate(admin, "site")
api_key.prefix = bootstrap_key[:8]
api_key.key_hash = ApiKey.hash_key(bootstrap_key)
api_key.save(update_fields=["prefix", "key_hash", "updated_at"])
self.stdout.write(f"Bootstrap API key installed (prefix={api_key.prefix})")
self.stdout.write(f"Site API key installed (prefix={api_key.prefix})")
accounts = admin_user_name
if staff_user_name: