fix(arch-043): repair indentation of cron job registration guard
This commit is contained in:
@@ -248,7 +248,7 @@ class AutomationPlugin(BasePlugin):
|
||||
from sqlalchemy import select as sa_select
|
||||
|
||||
# Get first tenant + admin user for seeding
|
||||
from app.models.user import User, UserTenant
|
||||
from app.models.user import User
|
||||
from app.models.tenant import Tenant
|
||||
tenant_result = await db.execute(sa_select(Tenant).limit(1))
|
||||
tenant = tenant_result.scalar_one_or_none()
|
||||
@@ -388,8 +388,9 @@ class AutomationPlugin(BasePlugin):
|
||||
logger.exception("Failed to register contributed automation '%s' from plugin '%s'", prefixed_name, plugin_name)
|
||||
self._contributed_automations[plugin_name] = automation_names
|
||||
|
||||
# Register cron jobs
|
||||
# Register cron jobs (skip if no tenant exists yet)
|
||||
cron_job_names: list[str] = []
|
||||
if default_tenant_id is not None:
|
||||
for cron_def in manifest.cron_jobs:
|
||||
prefixed_name = f"{plugin_name}.{cron_def.name}"
|
||||
cron_job_names.append(prefixed_name)
|
||||
|
||||
Reference in New Issue
Block a user