Skip to content

Remove organization name unique constraint - #799

Merged
payamnj merged 4 commits into
masterfrom
remove-organization-name-unique-constraint
Aug 5, 2026
Merged

Remove organization name unique constraint#799
payamnj merged 4 commits into
masterfrom
remove-organization-name-unique-constraint

Conversation

@payamnj

@payamnj payamnj commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

No description provided.

payamnj and others added 4 commits August 5, 2026 22:05
Global uniqueness on the organization name meant one tenant's choice of
name blocked an unrelated tenant from using theirs, which is a real
collision for organizations that genuinely share a name.

Nothing in the library resolved an organization by name - URLs,
permission checks and the active-organization session value are all
keyed on id - so the constraint provided no isolation, only friction.

Since names can now collide, __str__ includes the id so same-named
organizations stay distinguishable wherever a human picks one, such as
admin foreign key dropdowns. Email templates and public pages render
organization.name directly rather than the model, so they are unaffected.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The TableContainer capped its height at 440px, so once an account had
enough organizations the list became an inner scroll area nested inside
the page scroll. Removing the cap lets the table extend and the page
scroll as a whole.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The hook was pinned to v0.1.8 while pyproject.toml requires
>=0.16.1,<0.17.0, so the version gating PRs - CI runs `make pre-commit`,
which is `pre-commit run --all-files` - was two years behind the one
developers install. Formatting that the pinned ruff produces locally
could therefore differ from what CI accepted, in either direction.

Also renames the `ruff` hook id to `ruff-check`; `ruff` is a deprecated
alias in current ruff-pre-commit and reports itself as a legacy alias.

The reformatting this surfaces is committed separately.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Fallout from pinning the ruff hook to the required version: ruff now
collapses `def f() -> X:` followed by an indented `...` onto a single
line. Cosmetic only - every change is a Protocol or stub body, and no
runtime behavior is affected.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@payamnj
payamnj merged commit ce3bcf0 into master Aug 5, 2026
13 checks passed
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