Skip to content

Draft: Two admin issues

Brendan Berkley requested to merge two-admin-issues into master

Regarding this issue, 68557dd9 is the fix. Seems simple enough.

The other one is a lingering problem that I've seen since the organization owner concept was announced. Somewhere in prod is an org with a subscription and no owner.

I thought about fixing it manually in admin (because I'm 99% sure that we had no users before org owner was introduced) but then I hit the other problem, and figured in the time it took to get that fix deployed, I could write a migration.

That didn't quite work out. a4819c07 is what I thought would work, but when I run the migration I get AttributeError: 'Organization' object has no attribute '_org_user_model'. _org_user_owner is bad as well

I use _org_user_model and _org_user_model because add_user() in organizations_ext.models does. No idea why I can't use them in the migration.

Steps to reproduce the latter issue:

If it helps, my steps to reproduce were

  • Create organization
  • Subscribe to a plan
  • Open up the shell and use it to remove the organization owner from the org
  • Go to admin/djstripe/subscriptions or whatever admin page it was where we both saw this
Edited by Brendan Berkley

Merge request reports