Skip to content

fix(backend): drop stale domain_id kwarg in Admin Team seeding - #729

Open
larsgeorge-db wants to merge 1 commit into
developmentfrom
domain-id-fix
Open

fix(backend): drop stale domain_id kwarg in Admin Team seeding#729
larsgeorge-db wants to merge 1 commit into
developmentfrom
domain-id-fix

Conversation

@larsgeorge-db

Copy link
Copy Markdown
Collaborator

Problem

Startup fails after PR #597 with:

TypeError: 'domain_id' is an invalid keyword argument for TeamDb
... StartupSeedError: Default role/team seeding failed

PR #597 removed the legacy domain_id column from TeamDb (domain assignment is now polymorphic via entity_domain_associations, entity_type='team'), but SettingsManager.ensure_default_team_and_project still passed domain_id=None to the TeamDb(...) constructor. SQLAlchemy's declarative constructor rejects unknown kwargs, so seeding aborts and startup dies.

Fix

Remove the stale domain_id=None kwarg. It was passing None anyway, so this is behavior-preserving. ProjectDb never had domain_id, so it's unaffected.

Testing

  • One-line deletion; startup seeding no longer raises TypeError.

PR #597 removed the legacy domain_id column from TeamDb (domains are now
polymorphic via entity_domain_associations, entity_type='team'), but
ensure_default_team_and_project still passed domain_id=None to the TeamDb
constructor. SQLAlchemy's declarative constructor rejects unknown kwargs,
raising TypeError -> StartupSeedError and aborting startup. The value was
None anyway, so removing it is behavior-preserving.
@larsgeorge-db
larsgeorge-db requested a review from a team August 17, 2026 12:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant