Skip to content

fix package tab 500 when multiple domains mapped to an app#554

Open
sukuna28 wants to merge 1 commit intomainfrom
fix/package-tab-500-multiple-domains
Open

fix package tab 500 when multiple domains mapped to an app#554
sukuna28 wants to merge 1 commit intomainfrom
fix/package-tab-500-multiple-domains

Conversation

@sukuna28
Copy link
Copy Markdown
Member

@sukuna28 sukuna28 commented Apr 7, 2026

Summary

  • Overrides get_primary_domain() on TenantModel to use .filter(is_primary=True).first() instead of inheriting django-tenants' .get() which raises MultipleObjectsReturned when multiple domains are marked primary.
  • Fixes 500 error on the package detail page when multiple domains are mapped to a single application.

Fixes #288

Test plan

  • Map multiple domains to a single application
  • Navigate to the package tab in App Panel
  • Confirm package list loads without 500 error
  • Confirm package configuration URLs resolve correctly

Override get_primary_domain() on TenantModel to use filter().first()
instead of get(), preventing MultipleObjectsReturned exception.
@sukuna28 sukuna28 requested a review from shahharsh176 April 7, 2026 07:34
@sukuna28 sukuna28 marked this pull request as draft April 7, 2026 07:34
@sukuna28 sukuna28 marked this pull request as ready for review April 7, 2026 07:36
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.

App Panel: Issue in package tab when multiple domains mapped to a single application

2 participants