Fix duplicate table error: remove glue.models from model import loop
MenuNode and ContainerRelation now live in shared/models/ — importing glue.models caused SQLAlchemy to see duplicate table definitions. Also register the two new models in shared/models/__init__.py. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -11,7 +11,7 @@ from shared.config import init_config, config, pretty
|
||||
from shared.models import KV # ensure shared models imported
|
||||
# Register all app model classes with SQLAlchemy so cross-domain
|
||||
# relationship() string references resolve correctly.
|
||||
for _mod in ("blog.models", "market.models", "cart.models", "events.models", "glue.models"):
|
||||
for _mod in ("blog.models", "market.models", "cart.models", "events.models"):
|
||||
try:
|
||||
__import__(_mod)
|
||||
except ImportError:
|
||||
|
||||
@@ -25,3 +25,5 @@ from .calendars import (
|
||||
Calendar, CalendarEntry, CalendarSlot,
|
||||
TicketType, Ticket, CalendarEntryPost,
|
||||
)
|
||||
from .container_relation import ContainerRelation
|
||||
from .menu_node import MenuNode
|
||||
|
||||
Reference in New Issue
Block a user