diff --git a/backend/open_webui/config.py b/backend/open_webui/config.py index acd3d83bf8..a0855f4689 100644 --- a/backend/open_webui/config.py +++ b/backend/open_webui/config.py @@ -74,6 +74,7 @@ def run_migrations(): command.upgrade(alembic_cfg, 'head') except Exception as e: log.exception(f'Error running migrations: {e}') + raise if ENABLE_DB_MIGRATIONS: diff --git a/backend/open_webui/models/calendar.py b/backend/open_webui/models/calendar.py index 835313c703..3a3147a7ad 100644 --- a/backend/open_webui/models/calendar.py +++ b/backend/open_webui/models/calendar.py @@ -8,7 +8,6 @@ from open_webui.constants import ERROR_MESSAGES from open_webui.models.access_grants import AccessGrantModel, AccessGrants from open_webui.models.groups import Groups from open_webui.models.users import User, UserModel, UserResponse -from open_webui.utils.automations import rrule_interval_seconds from pydantic import BaseModel, ConfigDict, Field, field_validator from sqlalchemy import ( JSON, @@ -198,6 +197,8 @@ class CalendarEventForm(BaseModel): @classmethod def reject_sub_daily_rrule(cls, value: Optional[str]) -> Optional[str]: if value: + from open_webui.utils.automations import rrule_interval_seconds + try: interval = rrule_interval_seconds(value) except ValueError: @@ -228,6 +229,8 @@ class CalendarEventUpdateForm(BaseModel): @classmethod def reject_sub_daily_rrule(cls, value: Optional[str]) -> Optional[str]: if value: + from open_webui.utils.automations import rrule_interval_seconds + try: interval = rrule_interval_seconds(value) except ValueError: